]> git.openstreetmap.org Git - chef.git/blob - cookbooks/munin/templates/default/backup.cron.erb
Make the rrddump.sh script do all the work, including cleanup.
[chef.git] / cookbooks / munin / templates / default / backup.cron.erb
1 #!/bin/sh
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 T=$(mktemp -d -t -p /var/tmp munin.XXXXXXXXXX)
6 D=$(date +%Y-%m-%d)
7 B=munin-$D.tar.gz
8
9 mkdir $T/munin-$D
10 ln -s /var/lib/munin/openstreetmap $T/munin-$D
11 ln -s /var/lib/munin/*.storable $T/munin-$D
12
13 export GZIP="--rsyncable -9"
14 export RSYNC_RSH="ssh -ax"
15
16 nice tar --create --gzip --dereference --directory=$T --file=$T/$B munin-$D
17 nice rsync --preallocate --fuzzy $T/$B backup::backup
18
19 rm -rf $T