]> git.openstreetmap.org Git - chef.git/blob - cookbooks/munin/files/default/rrddump.sh
Merge pull request #109 from zerebubuth/munin-dump
[chef.git] / cookbooks / munin / files / default / rrddump.sh
1 #!/bin/bash
2
3 RRD_DIR=/var/lib/munin/openstreetmap
4 DIR=`mktemp -d`
5 NPROCS=8
6
7 function cleanup {
8 rm -rf "$DIR"
9 }
10
11 trap cleanup EXIT
12
13 cd "$RRD_DIR"
14 find -name "*.rrd" -print0 | xargs --null --max-procs=$NPROCS -I {} rrdtool dump {} "$DIR/{}.xml"
15
16 cd "$DIR"
17 find -name "*.xml" -print0 | tar zcf - --null -T -