X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/26a68b9cedfe53e69e6b1571964985be174eee30..18424e9038b5f06d815167da8f0c10bed5d5d211:/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 80047e839..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 --bwlimit=500 $T/$B backup::backup +nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T