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 16:36 by olaf
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki