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
ln -s <%= @directory %> $T/wiki-<%= @name %>-$D/www
-#make backup rsyncable
-GZIP="--rsyncable -9"
-export GZIP
-nice tar --create --gzip --dereference --directory=$T --file=$T/$B wiki-<%= @name %>-$D
+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
nice rsync $T/$B backup::backup --fuzzy
rm -rf $T