Converting RRDs - 32-bit to 64-bit architecture migration

When migrating from 32-bit to 64-bit architecture, note that the 32-bit RRDs are incompatible and need to be converted to the new architecture. This can be accomplished by converting the RRDs to XML format using the 32-bit RRDTool binary and restoring the XML file using the 64-bit architecture RRDTool binary.

  • On the 32-bit architecture:
    mkdir -p /tmp/rrd
    cd /usr/local/groundwork/rrd
    for i in *.rrd; do /usr/local/groundwork/common/bin/rrdtool dump ${i} /tmp/rrd/${i}.xml; done
    tar czf /tmp/rrd.dumps.tgz /tmp/rrd/*.xml
    • Then copy the tgz of the xml files over to the 64-bit system
  • On the 64 bit architecture:
    tar xzf rrd.dumps.tgz -C /
    cd /tmp/rrd
    for i in *.xml; do /usr/local/groundwork/common/bin/rrdtool restore -f ${i} /usr/local/groundwork/rrd/${i%.xml}; done
    chown -R nagios.nagios /usr/local/groundwork/rrd
    chmod -R 644           /usr/local/groundwork/rrd
    rm -Rf /tmp/rrd


kb kb Delete
howto howto Delete
rrd rrd Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Oct 19, 2010

    Hans Kriel says:

    If you are moving the installation to a new machine, you can also do this with s...

    If you are moving the installation to a new machine, you can also do this with ssh and public key authentication while both are running. None of the graphs will have a gap due to an extended outage, something to consider if there are a lot of rrd files. The old machine also continues to be available unmodified.

    For Cacti graphs, install NMS on the new server, importing the database from the old and get it working first. Set up the keys so the 'root' user on the old machine can reach the new one. Then run this script on the old machine. (The "-h none" option is necessary for some versions of rrdtool which can't deal with headers):

    cd /usr/local/groundwork/cacti/rra
    for f in `ls | sed -e 's/\.rrd$//'`
      /usr/local/groundwork/bin/rrdtool dump $f.rrd -h none > /tmp/$f.xml
      scp /tmp/$f.xml root@NEWMACHINE:/tmp
      ssh root@NEWMACHINE /usr/local/groundwork/nms/tools/rrdtool/bin/rrdtool restore /tmp/$f.xml /usr/local/groundwork/nms/applications/cacti/rra/$f.rrd -f
      ssh root@NEWMACHINE chown nagios.nagios /usr/local/groundwork/nms/applications/cacti/rra/$f.rrd
      ssh root@NEWMACHINE chmod 644 /usr/local/groundwork/nms/applications/cacti/rra/$f.rrd
      ssh root@NEWMACHINE rm /tmp/$f.xml
      rm /tmp/$f.xml
      echo $f.rrd done