X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/1311c809f2e83ece3c73c066a30d1205629406f8..23b449a94ef4ffc4746775f6a6d6b88c8a1c46c9:/cookbooks/switch2osm/templates/default/backup.cron.erb diff --git a/cookbooks/switch2osm/templates/default/backup.cron.erb b/cookbooks/switch2osm/templates/default/backup.cron.erb index 4a472e5aa..54717f49c 100644 --- a/cookbooks/switch2osm/templates/default/backup.cron.erb +++ b/cookbooks/switch2osm/templates/default/backup.cron.erb @@ -7,12 +7,15 @@ D=$(date +%Y-%m-%d) B=switch2osm-$D.tar.gz mkdir $T/switch2osm-$D -mysqldump --user=switch2osm-user --password=<%= @passwords["switch2osm-user"] %> --opt switch2osm-blog > $T/switch2osm-$D/switch2osm-blog.sql +echo '[mysqldump]' > $T/mysqldump.opts +echo 'user=switch2osm-user' >> $T/mysqldump.opts +echo 'password=<%= @passwords["switch2osm-user"] %>' >> $T/mysqldump.opts +mysqldump --defaults-file=$T/mysqldump.opts --opt switch2osm-blog > $T/switch2osm-$D/switch2osm-blog.sql ln -s /srv/switch2osm.org $T/switch2osm-$D/www export GZIP="--rsyncable -9" nice tar --create --gzip --dereference --directory=$T --file=$T/$B switch2osm-$D -nice rsync $T/$B backup::backup +nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T