Search code examples
rrdtoolconverters

Convert rrd files from 32 bit ARM to x86_64


I have a lot of rrd files which got generated on a 1st Gen Cubieboard (1 GHz CPU, 1 Core, 1 GB RAM), and about a year ago, when I migrated the data loggers to an x86_64 machine, I noticed that I can no longer read those old files. I didn't know they were platform specific.

I know that there is a workflow where I export the data from the files into XML files and then import them on the other architecture, but this is not my first choice as the old board is painfully slow and has other important work to do, like be a DNS server. The rrdtool version is stuck at 1.4.7 and there are 1.4 gigs worth of files to get processed.

Is there a way to emulate the Cubieboard on a fast Intel machine or some x86_64 based tool which can convert those rrd files?


Solution

  • RRD File are not portable between architectures, as you have noticed. The format depends not only on the 32/64 bit integer size, but also on the 'endian' characteristics, and even on the compiler behaviour with structure padding. It may be possible to compile the library in 32-bit mode on your new platform, but it is still not likely to be compatible with your old RRD files as there are other hardware differences to consider.

    In short, your best option is to (slowly?) export to XML and then re-import in the new architecture, as you already mentioned. I have previously done this on a large RRD installation, running in parallel for a while to avoid gaps in the data, but it takes time.

    I seem to remember that Tobi was, at one time, planning on a new architecture-independent RRD format in RRD 1.6, but even if this comes to pass then it won't help you with your legacy data.