RRD XML data in a backup
Trying to read the RRD data in a full backup without doing a restore.
Currently my research into RRD databases points me a at a totally different XML setup as below:
<rra><cf><pdp_per_row><xff><cdp_prep><ds><value><unknown_datapoints></unknown_datapoints></value></ds>... <cdp_prep><database><row><v>...</v></row> ...</database></cdp_prep></cdp_prep></xff></pdp_per_row></cf></rra> ...</lastupdate></step></version></rrd>
But what I get in the backup is:
Does anyone know how to convert one to the other?
"The dump function writes the contents of an RRD in human readable (?) XML format to a file or to stdout"
The human readable part put me on the wrong path.
Is there an easy way of finding which version of rrdtool different versions of pfsense use? Mostly interested in 2.2.4 and 2.3.X
Get "ERROR: Can only restore version >= 2 (Not ). Dump your rrd using a current rrdtool dump." when trying to do a rrdtool restore.
2.2.4 is using rrdtool version 1.2.30 - booted up a linux vm to try and get the xml back into rrd data and now getting:
"ERROR: line 1:expected <xmldata>element but found <rrd>"
For anyone trying this, it is quicker to download and boot up a VM than it is trying to get newer versions of rrdtool to work under windows FYI.</rrd></xmldata>
We couldn't include the rrdtool xml directly in the config, it would be massive! We compress it and then encode it so it can be archived in XML.
Take the contents of <xmldata>, run it through a base64 decode and then gz inflate, and then you'll have the format of data rrdtool wants.
For example, when making the backup, it gets run through something like this:
And when restoring, this:
Sorry for the slow reply.
Thanks for this, will try that tomorrow if I can get it working it will be really helpful.