[rrd-users] XML dump/restore: How to handle "cdp_prep"?

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Sun Aug 17 00:08:23 CEST 2014

----- Original Message ----- 
From: "Christian Schrötter" <rrdtool at lists.kb19.at>
To: "rrd-users Liste" <rrd-users at lists.oetiker.ch>
Sent: Saturday, August 16, 2014 6:07 PM
Subject: [rrd-users] XML dump/restore: How to handle "cdp_prep"?

> Hello list!
> I'm writing a small PHP script to dump a (Munin) RRD file, change some 
> things with SimpleXML and restore it to a RRD file:
> * GROW each RRA like rrdresize by a new format definition.

Explain "by a new format definition".

> * Import old (deleted) data from another (dumped) RRD file.
> This works great, but I'm not sure what to do with the "cdp_prep" XML 
> node, especially with the *value elements. Am I supposed to leave it 
> unchanged (the rrdresize way), delete the whole node or change it to 
> another value?

Rrdtool resize adds rows to the past of the data. It does not do anything 
with the present time where the current CDP is being built. If your version 
is doing something to the data (e.g. change amount of time per CDP) then you 
should change cdp_prep accordingly.  If not, not.

> Because I don't understand the usage of this, I'm a little bit confused.
> Or is there a right way to "update/sync" it? Thanks for any hints! :-)

If you don't know how CDPs are built, may I suggest you visit my site ( 
http://rrdtool.vandenbogaerdt.nl ) and also look in the source code of 


More information about the rrd-users mailing list