Browse files

Added an option to the config to turn whole-backup-compression on and…

… off
  • Loading branch information...
1 parent cb117a3 commit 8633b335ae79757f478dcb8ce99797b9d4683f28 Pascal König committed Sep 21, 2012
Showing with 17 additions and 1 deletion.
  1. +10 −0 config.example
  2. +7 −1 minecraft
@@ -65,6 +65,16 @@ LOGPATH="/home/${USERNAME}/mcbackup/logs"
# whole-backup is a complete uncompressed backup of the whole server folder.
+# Compress the whole backup with bzip2?
+# Note that this may not save a lot of disk space since there can be a lot of files
+# in your server directory, that are already compressed, but it can slow down the
+# backup a bit. This highly depends on the plugins you're using.
+# For example: The png files generated by Dynmap are already compressed and still use
+# a lot of space in your server directory, so the compression ratio of the compressed
+# backup will not be very high.
# Where the worlds are located on the disk. Can not be the same as MCPATH.
# You need to move your worlds to this directory manually, the script
# will then handle the nessessay symlinks.
@@ -203,7 +203,13 @@ mc_whole_backup() {
echo "backing up entire setup into $WHOLEBACKUP"
path=`datepath $WHOLEBACKUP/mine_`
as_user "mkdir -p $path"
- as_user "tar -cpf $path/whole-backup.tar $MCPATH"
+ then
+ as_user "tar -cpjf $path/whole-backup.tar.bz2 $MCPATH"
+ else
+ as_user "tar -cpf $path/whole-backup.tar $MCPATH"
+ fi
mc_world_backup() {

0 comments on commit 8633b33

Please sign in to comment.