]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/git/templates/default/backup.cron.erb
Set load average limit for re-renders to number of CPU threads
[chef.git] / cookbooks / git / templates / default / backup.cron.erb
index 13f1067b16ec56f0ad95ddb2ca9c499e10c692c1..63882720f436b1682647d8b7d5d5323aee837a71 100644 (file)
@@ -4,13 +4,13 @@
 
 T=$(mktemp -d -t -p /var/tmp git.XXXXXXXXXX)
 D=$(date +%Y-%m-%d)
-B=<%= node[:git][:backup] %>-$D.tar.gz
+B=git-$D.tar.gz
 
 ln -s /var/lib/git $T/git-$D
 
-export GZIP="--rsyncable -9"
+export RSYNC_RSH="ssh -ax"
 
-nice tar --create --gzip --dereference --directory=$T --file=$T/$B git-$D
-nice rsync $T/$B backup::backup
+nice tar --create --dereference --directory=$T git-$D | nice gzip --rsyncable -9 > $T/$B
+nice rsync --preallocate --fuzzy $T/$B backup::backup
 
 rm -rf $T