[rrd-users] Downgrading an rrd from version 0003 to 0001 (oralternatively, Cricket's HTML summary)

Robert Woodcock Robert.Woodcock at Homestone.com
Tue Apr 3 17:37:31 CEST 2007

I wrote:
> I thought I would try to do this by dumping all of my rrds and
> changing the <version> tag, then downgrading rrdtool from 1.2.19 to
> 1.0.49, then restoring all of the rrds.
> The older version of rrdtool says:
> ERROR: No <xff> tag found

I figured it out:

# Backup all RRDs in $1
find $1 -name '*.rrd' | (
while read RRDFILE
        XMLFILE=$(echo $RRDFILE | sed s/rrd$/xml/)
        rrdtool dump $RRDFILE | sed 's,<version> 0003
</version>,<version> 0001 </version>,' | grep -v 'params>' | grep -v
'_value>' > $XMLFILE
        chown cricket.cricket $XMLFILE

[downgrade rrdtool]

# Restore all RRD dumps in $1
find $1 -name '*.xml' | (
while read XMLFILE
        RRDFILE=$(echo $XMLFILE | sed s/xml$/rrd/)
        rm -f $RRDFILE
        rrdtool restore $XMLFILE $RRDFILE
        chown cricket.cricket $RRDFILE

More information about the rrd-users mailing list