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.
Hi, Love your blog ... it would be nice to add tutorials for CentOS & Firewall installation and some basic stuff for people who wants to learn basic System Administration or a small guide about what is used on daily basis in sys admin. I know they are available online but it makes a difference when someone who is using them practically and tells you how/which one to use (fw).
ReplyDeleteThanks
Thanks and appreciated love to blog all such things but due to lake of time (full time working) its hard for me to blog on things which are already online :). However anyone interested in following sysadmin as a career I would strongly recommend to read the book "The Practice of System And Network Administration" by Thomas A. Limocelli.
ReplyDeleteTry to get this book its a great resource for sysadmins.
hola me ayudan! porfavor Soy nuevo en ESTO y mi tarea es migrar cactus, Tengo El Problema de los Versiones de 32 bits a 64 bits y no propiamente de Como hacerlo
DeleteThanks for this, helped me out and now RRD is working again.
ReplyDeletehola help me!!! porfavor soy nuevo en esto y mi tarea es migrar cacti, tengo el problema de los versiones de 32 bits a 64 bits y no se como hacerlo
DeleteThanks! That saved me from wasting 2 years of data stored of temperatures in my house just because I decided to move 1wire from one server to another!
ReplyDelete/Jimmy
Glad my blog of any help.
DeleteHi there.
ReplyDeleteThanks for this blog, that worked for my graph, but, just for watch historic.
For the most of the devices, they graphs (not all) stay empty after transfert. I tryed to compare between my old and new cacti (Ubuntu 9.10 32b cacti 0.8.7e with spine / Debian Squeeze 64b, Cacti 0.8.8a spine), I tests with snmpwalk, watch response on tcpdump, turn on debug-graph and, I don't find why. When I create one graph, that work.
Any clues ?
Have good day