X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/b1c35e7b993b29d8212a0a98e810bbb1c710e319..0b5505e611e65a6dac1fb91dda7bc1067db75417:/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