X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/5232219867a768acea6c943fdd99126a6d8f7098..dfd2bb176e3e87c8f71ea1a5c84a3ccfd185168f:/cookbooks/git/templates/default/backup.cron.erb diff --git a/cookbooks/git/templates/default/backup.cron.erb b/cookbooks/git/templates/default/backup.cron.erb index 16f85593b..ac2167b8c 100644 --- a/cookbooks/git/templates/default/backup.cron.erb +++ b/cookbooks/git/templates/default/backup.cron.erb @@ -4,13 +4,14 @@ T=$(mktemp -d -t -p /var/tmp git.XXXXXXXXXX) D=$(date +%Y-%m-%d) -B=git-$D.tar.gz +B=<%= node[:git][:backup] %>-$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 rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T