@@ -499,7 +499,11 @@ function __get_backup_tarball_remote_command()
499499 __get_flags_tar_blacklist " $target "
500500 command=" $tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c -j " $target " "
501501 ;;
502- tar.lz)
502+ tar.xz)
503+ __get_flags_tar_blacklist " $target "
504+ command=" $tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --xz " $target " "
505+ ;;
506+ tar.lzma)
503507 __get_flags_tar_blacklist " $target "
504508 command=" $tar $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --lzma " $target " "
505509 ;;
@@ -586,9 +590,16 @@ function __get_backup_tarball_command()
586590 __get_flags_tar_blacklist " $target "
587591 command=" $tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c -j -f"
588592 ;;
589- tar.lz)
593+ tar.xz)
594+ if [[ ! -x $xz ]]; then
595+ error " The archive type \" tar.xz\" depends on the tool \"\$ xz\" ."
596+ fi
597+ __get_flags_tar_blacklist " $target "
598+ command=" $tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --xz -f"
599+ ;;
600+ tar.lzma)
590601 if [[ ! -x $lzma ]]; then
591- error " The archive type \" tar.lz \" depends on the tool \"\$ lzma\" ."
602+ error " The archive type \" tar.lzma \" depends on the tool \"\$ lzma\" ."
592603 fi
593604 __get_flags_tar_blacklist " $target "
594605 command=" $tar $incremental $blacklist $dumpsymlinks $BM_TARBALL_EXTRA_OPTIONS -p -c --lzma -f"
@@ -658,7 +669,8 @@ function build_encrypted_archive
658669 error " The configuration variable \" BM_ENCRYPTION_RECIPIENT\" must be defined."
659670 fi
660671
661- if [[ " $BM_TARBALL_FILETYPE " = " tar.lz" ]] ||
672+ if [[ " $BM_TARBALL_FILETYPE " = " tar.xz" ]] ||
673+ [[ " $BM_TARBALL_FILETYPE " = " tar.lzma" ]] ||
662674 [[ " $BM_TARBALL_FILETYPE " = " zip" ]] ||
663675 [[ " $BM_TARBALL_FILETYPE " = " dar" ]]; then
664676 error " The encryption is not yet possible with \"\$ BM_TARBALL_FILETYPE\" archives."
@@ -711,7 +723,6 @@ function __build_local_archive()
711723 warning " File \$ file_to_check already exists, skipping."
712724 debug " rm -f ${bm_pending_incremental_list} .orig"
713725 rm -f " ${bm_pending_incremental_list} .orig"
714- continue
715726 fi
716727}
717728
@@ -797,7 +808,7 @@ function __make_local_tarball_token
797808 " dar" )
798809 __get_flags_dar_incremental " $dir_name "
799810 ;;
800- " tar" |" tar.gz" |" tar.bz2" |" tar.lz " )
811+ " tar" |" tar.gz" |" tar.bz2" |" tar.xz " | " tar.lzma " )
801812 __get_flags_tar_incremental " $dir_name "
802813 ;;
803814 esac
@@ -854,9 +865,11 @@ function backup_method_tarball()
854865 debug " backup_method_tarball ($method )"
855866
856867 info " Using method \"\$ method\" ."
857-
868+ local oldgzip=" $GZIP "
869+ export GZIP=" -n"
870+
858871 # build the command line
859- case $BM_TARBALL_FILETYPE in
872+ case $BM_TARBALL_FILETYPE in
860873 tar|tar.bz2|tar.gz)
861874 dumpsymlinks=" $( __get_flags_tar_dump_symlinks) "
862875 ;;
@@ -874,9 +887,9 @@ function backup_method_tarball()
874887 else
875888 __make_remote_tarball_archives
876889 fi
877-
890+ GZIP= " $oldgzip "
878891 # Handle errors
879- # since version 0.8, BM's follows up its process even if errors were triggered
892+ # since version 0.8, BM's follows up its process even if errors were triggered
880893 # during the archive generation.
881894 if [[ $nb_err -eq 1 ]]; then
882895 warning " 1 error occurred during the tarball generation."
0 commit comments