[rrd-users] How do I move my rrds to my new MRTG system.

Pada rrdtool at pada.za.net
Sat Oct 24 00:12:15 CEST 2009



Matthias.Merk wrote:
> 
> I dont know if rrdtool has a option for doing it recursivly,
> but something like this should do it if the filenames stay the same:
> 
> for i in *.rrd; do rrdtool dump $i > `basename $i .rrd`.xml; done
> for i in *.xml; do rrdtool restore $i `basename $i .xml`.rrd;done
> 
> or use find if you have RRDs in subdirecties:
> find . -name *.rrd -exec rrdtool dump {} >`basename {} .rrd`.xml \;
> 
> i didn't try these though ;)
> 

I've used the following to recursively dump & import:
for i in `find -name "*.rrd"`; do rrdtool dump $i > $i.xml; done
for i in `find -name "*.xml"`; do rrdtool restore $i `echo $i |sed
s/.xml//g`; done

Enjoy

Chris
-- 
View this message in context: http://n2.nabble.com/How-do-I-move-my-rrds-to-my-new-MRTG-system-tp1075048p3881563.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list