2 T=`mktemp -d -t -p /var/tmp mediawiki-<%= @name %>.XXXXXXXXXX`
4 B=wiki-<%= @name %>-$D.tar.gz
6 mkdir $T/wiki-<%= @name %>-$D
7 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
8 ln -s <%= @directory %> $T/wiki-<%= @name %>-$D/www
9 export GZIP="--rsyncable -9" #make backup rsyncable
10 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
11 nice rsync $T/$B backup::backup --fuzzy