X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/8a9f373d37ebfd2be884e4ca66526a0a5151817a..55d3ae09e912b8627faa004e8f7fb7dab5d1c7f2:/cookbooks/stateofthemap/templates/default/backup.cron.erb?ds=sidebyside diff --git a/cookbooks/stateofthemap/templates/default/backup.cron.erb b/cookbooks/stateofthemap/templates/default/backup.cron.erb index d7742f449..e0f4d87ba 100644 --- a/cookbooks/stateofthemap/templates/default/backup.cron.erb +++ b/cookbooks/stateofthemap/templates/default/backup.cron.erb @@ -8,7 +8,7 @@ B=sotm-$D.tar.gz mkdir $T/sotm-$D -<% %w(2007 2008 2009 2010 2011 2012 2016).each do |year| -%> +<% %w(2007 2008 2009 2010 2011 2012).each do |year| -%> echo '[mysqldump]' > $T/mysqldump.opts echo 'user=sotm<%= year %>' >> $T/mysqldump.opts echo 'password=<%= @passwords["sotm#{year}"] %>' >> $T/mysqldump.opts @@ -21,11 +21,10 @@ ln -s /srv/2009.stateofthemap.org $T/sotm-$D/www2009 ln -s /srv/2010.stateofthemap.org $T/sotm-$D/www2010 ln -s /srv/2011.stateofthemap.org $T/sotm-$D/www2011 ln -s /srv/2012.stateofthemap.org $T/sotm-$D/www2012 -ln -s /srv/2016.stateofthemap.org $T/sotm-$D/www2016 export RSYNC_RSH="ssh -ax" -nice tar --create --dereference --directory=$T --warning=no-file-changed sotm-$D | nice gzip --rsyncable -9 > $T/$B +nice tar --create --dereference --directory=$T sotm-$D | nice gzip --rsyncable -9 > $T/$B nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T