Today I wanted to manually create graphs from RRDTool ".rrd" files, created with Cacti. I copied the files over to another computer, but when I tried to run a "rrdtool graph ..." on them, I got the following error:
That was true: The cacti host was 32bits and the host I wanted to draw the graphs on was 64bits.ERROR: This RRD was created on another architecture
[SOLUTION]
Thanks to the blog article "Converting 32bit RRD to 64bit RRD (moving cacti between architectures)" by Carl Heaton, the solution is easy:
Convert the RRD files to XML, copy the XMLs (instead of the RRDs) to another host, and then convert them back to RRDs.
I took Carl's instructions and created a small BASH script:
Code: Select all
#!/bin/bash
case "$1" in
    export)
        for FILE in `ls *.rrd`; do
            echo -n "Converting '$FILE' to XML...   "
            rrdtool dump $FILE > $FILE.xml
            echo "OK"
        done
    ;;
    import)
        for FILE in `ls *.xml`; do
            echo -n "Converting '$FILE' to RRD...   "
            FILE_OUT=$(basename "$FILE")
            rrdtool restore $i $FILE_OUT
            echo "OK"
        done
    ;;
    *)
        echo ""
        echo "SYNTAX: $0 (import|export)"
        echo ""
    ;;
esac