X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/3ae5b9b4fbb5a637df5a9e8138cd421e0c6e74e7..f65e6e5bdfdab789a385847963b9c1ffa799a6e3:/cookbooks/git/templates/default/backup.cron.erb?ds=inline diff --git a/cookbooks/git/templates/default/backup.cron.erb b/cookbooks/git/templates/default/backup.cron.erb index 6344e09b5..63882720f 100644 --- a/cookbooks/git/templates/default/backup.cron.erb +++ b/cookbooks/git/templates/default/backup.cron.erb @@ -4,14 +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 -c arcfour" +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