]> git.openstreetmap.org Git - chef.git/blob - cookbooks/munin/files/default/rrddump.sh
Touch XML files to reflect date of original RRD file. Don't run dump in parallel...
[chef.git] / cookbooks / munin / files / default / rrddump.sh
1 #!/bin/bash
2
3 RRD_DIR=/var/lib/munin/openstreetmap
4 DIR=`mktemp -d`
5
6 function cleanup {
7   rm -rf "$DIR"
8 }
9
10 trap cleanup EXIT
11
12 cd "$RRD_DIR"
13 for f in *.rrd; do
14   rrdtool dump "$f" "$DIR/${f}.xml"
15   touch -r "$f" "$DIR/${f}.xml"
16 done
17
18 cd "$DIR"
19 find -name "*.xml" -print0 | tar zcf - --null -T -