Recently I have to migrate our cacti installation to new machine during which i encounter few issues.
After copying the RRD files to new machines and accessing cacti web http://myserver/cacti gives empty graphs. (wired)
After digging the logs (in apache error log) found out that RRD files is not portable between different architechture.
ERROR: This RRD was created on another architecture
In my case the old machine was 32bit arch with 32bit OS, and the new machine is 64bit with 64bit OS.
Quick googling tells that using rrddump and rrdrestore one can transfer RRD between architectures with ease.
EXAMPLES
To transfer an RRD between architectures, follow these steps:
1. On the same system where the RRD was created, use rrdtool dump to export the data to XML format.
# for i in ./*.rrd;do rrdtool dump $i ../rrd/$i.xml;done
(to converted all the files in rrd directory to XML format)
2. Transfer the XML dump to the target system.
3. Run rrdtool restore to create a new RRD from the XML dump.
# for i in ./*.xml; do rrdtool restore "$i" "../rrd/${i%.xml}"; done
After this cacti was up and running with all the old graphs migrated successfully.
After copying the RRD files to new machines and accessing cacti web http://myserver/cacti gives empty graphs. (wired)
After digging the logs (in apache error log) found out that RRD files is not portable between different architechture.
ERROR: This RRD was created on another architecture
In my case the old machine was 32bit arch with 32bit OS, and the new machine is 64bit with 64bit OS.
Quick googling tells that using rrddump and rrdrestore one can transfer RRD between architectures with ease.
EXAMPLES
To transfer an RRD between architectures, follow these steps:
1. On the same system where the RRD was created, use rrdtool dump to export the data to XML format.
# for i in ./*.rrd;do rrdtool dump $i ../rrd/$i.xml;done
(to converted all the files in rrd directory to XML format)
2. Transfer the XML dump to the target system.
3. Run rrdtool restore to create a new RRD from the XML dump.
# for i in ./*.xml; do rrdtool restore "$i" "../rrd/${i%.xml}"; done
After this cacti was up and running with all the old graphs migrated successfully.