From: Grant Slater Date: Sat, 6 Feb 2016 22:29:48 +0000 (+0000) Subject: Mediawiki: use lz4 instead of xz for sql backup X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/48dd1d495ac9aa21f88281492618998cb9c835de Mediawiki: use lz4 instead of xz for sql backup --- diff --git a/cookbooks/mediawiki/recipes/default.rb b/cookbooks/mediawiki/recipes/default.rb index 34c4f0ab6..b9806477c 100644 --- a/cookbooks/mediawiki/recipes/default.rb +++ b/cookbooks/mediawiki/recipes/default.rb @@ -44,6 +44,7 @@ package "poppler-utils" # Mediawiki backup package "xz-utils" +package "liblz4-tool" # Mediawiki packages for VisualEditor support package "curl" diff --git a/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb b/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb index d0f8e43aa..f2e163c3c 100755 --- a/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb +++ b/cookbooks/mediawiki/templates/default/mediawiki-backup.cron.erb @@ -4,7 +4,7 @@ D=`date +%Y-%m-%d` B=wiki-<%= @name %>-$D.tar.gz mkdir $T/wiki-<%= @name %>-$D -mysqldump --user="<%= @database_params[:username] %>" --password="<%= @database_params[:password] %>" --opt --skip-lock-tables --single-transaction "<%= @database_params[:name] %>" | xz -9c > $T/wiki-<%= @name %>-$D/wiki.sql.xz +mysqldump --user="<%= @database_params[:username] %>" --password="<%= @database_params[:password] %>" --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/w/images/thumb --exclude=wiki-<%= @name %>-$D/w/.git --file=$T/$B wiki-<%= @name %>-$D