"ERROR: This RRD was created on another architecture"

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

"ERROR: This RRD was created on another architecture"

Post by ^rooker »

[PROBLEM]
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:
ERROR: This RRD was created on another architecture
That was true: The cacti host was 32bits and the host I wanted to draw the graphs on was 64bits.

[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
Now just run the script with argument "export" on the RRDs, and then with "import" on the XMLs.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply