X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/51096343cee85550cd197da1f8354f8407506af5..a661370166bbac0bbe8c8b1f0ba947e3a269edee:/cookbooks/munin/templates/default/backup.cron.erb?ds=sidebyside diff --git a/cookbooks/munin/templates/default/backup.cron.erb b/cookbooks/munin/templates/default/backup.cron.erb index 33ac59256..9ff94f2e0 100644 --- a/cookbooks/munin/templates/default/backup.cron.erb +++ b/cookbooks/munin/templates/default/backup.cron.erb @@ -6,10 +6,14 @@ T=$(mktemp -d -t -p /var/tmp munin.XXXXXXXXXX) D=$(date +%Y-%m-%d) B=munin-$D.tar.gz +mkdir $T/munin-$D +ln -s /var/lib/munin/openstreetmap $T/munin-$D +ln -s /var/lib/munin/*.storable $T/munin-$D + export GZIP="--rsyncable -9" export RSYNC_RSH="ssh -ax" -nice tar --create --gzip --dereference --directory=/var/lib/munin --file=$T/$B openstreetmap *.storable +nice tar --create --gzip --dereference --directory=$T --file=$T/$B munin-$D nice rsync $T/$B backup::backup rm -rf $T