X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/adfa6891bb5bec936aea3afc25c6d17a0ca16e94..6accbe964d9196c8f5b3e8685b10f38b990da6b7:/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb?ds=sidebyside diff --git a/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb b/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb index 37c3b02f6..cd6f3c6e4 100755 --- a/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb +++ b/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb @@ -7,10 +7,9 @@ mkdir $T/wiki-<%= @name %>-$D echo '[mysqldump]' > $T/mysqldump.opts echo 'user=<%= @database_params[:username] %>' >> $T/mysqldump.opts echo 'password=<%= @database_params[:password] %>' >> $T/mysqldump.opts -mysqldump --defaults-file=$T/mysqldump.opts -opt --skip-lock-tables --single-transaction "<%= @database_params[:name] %>" | lz4 -9 > $T/wiki-<%= @name %>-$D/wiki.sql.lz4 +mysqldump --defaults-file=$T/mysqldump.opts --opt --skip-lock-tables --single-transaction "<%= @database_params[:name] %>" | lz4 -9 > $T/wiki-<%= @name %>-$D/wiki.sql.lz4 ln -s <%= @directory %> $T/wiki-<%= @name %>-$D/www -export GZIP="--rsyncable -9" #make backup rsyncable -nice tar --create --gzip --dereference --directory=$T --exclude=wiki-<%= @name %>-$D/www/w/images/thumb --exclude=wiki-<%= @name %>-$D/www/w/.git --exclude=wiki-<%= @name %>-$D/www/w/extensions/*/.git --file=$T/$B wiki-<%= @name %>-$D -nice rsync $T/$B backup::backup --fuzzy +nice tar --create --dereference --directory=$T --warning=no-file-changed --exclude=wiki-<%= @name %>-$D/www/w/images/thumb --exclude=wiki-<%= @name %>-$D/www/w/.git --exclude=wiki-<%= @name %>-$D/www/w/extensions/*/.git wiki-<%= @name %>-$D | nice gzip --rsyncable -9 > $T/$B +nice rsync --preallocate --fuzzy $T/$B backup::backup rm -rf $T