User Tools

Site Tools


application_specific_backups:rrdtool

Use at your own risk.

#!/bin/bash
# backup RRD database files

RRD="/usr/bin/rrdtool"

# example: RRD_DATADIRS="/tmp /tmp/evenmoretmp /funfun"
#   use RRD_DATADIRS="." to get guarantied all RRD files, and have guarantied ultra slow performance
RRD_DATADIRS="/var/lib/munin"

DUMPDIR="/home/storage/backupdump/rrdtool"

for x in $RRD_DATADIRS; do
  for y in `find $RRD_DATADIRS -name '*.rrd'`; do
    MYDUMPPLACE=$DUMPDIR`dirname $y`
    mkdir -p $MYDUMPPLACE
    $RRD dump $y $MYDUMPPLACE/`basename $y`.xml
  done
done
application_specific_backups/rrdtool.txt · Last modified: 2009/06/17 14:36 by olaf