diff --git a/backup-daemon/data/backup-auto-efi b/backup-daemon/data/backup-auto-efi index 1d71cea..ad30baf 100755 --- a/backup-daemon/data/backup-auto-efi +++ b/backup-daemon/data/backup-auto-efi @@ -581,6 +581,8 @@ generateExcludeFile() { echo "/cdrom" >>$EXCLUDEFILE echo "/swap_file" >>$EXCLUDEFILE echo "/var/lib/docker/overlay2" >>$EXCLUDEFILE + echo "*/backup/snapshots" >>$EXCLUDEFILE + echo "/var/log" >>$EXCLUDEFILE #bind挂载的目录不进行备份或还原 if [ -z $fstab_path ]; then @@ -1004,6 +1006,10 @@ getLastUsefulBackupPointUuid() { currentType=false fi + if [[ "$xxx" =~ "3" ]]; then + currentType=false + fi + if [[ "$xxx" =~ "" ]]; then if [ "$currentState" = true -a "$currentType" = true ]; then #"/backup"是不是一个独立的盘 lastUsefulBackupPointUuid=$currentUuid @@ -1116,6 +1122,7 @@ restoreAuto() { #还原 if [ ! -e "${restoreDir}/data/boot/efi" ]; then excludes="${excludes} --exclude=/boot/efi" fi + excludes="${excludes} --exclude=*/backup/snapshots" #yi jian huan yuan if [ ! -e "${restoreDir}/data/data" ]; then #这两行要一致