From 01661d185144b95d4bbddaf8666c28a6ce4c427c Mon Sep 17 00:00:00 2001 From: zhaominyong Date: Wed, 27 Apr 2022 11:11:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E4=BB=BD=E8=BF=98?= =?UTF-8?q?=E5=8E=9Fgrub=E8=84=9A=E6=9C=AC=EF=BC=8C=E8=BF=98=E5=8E=9F?= =?UTF-8?q?=E6=97=B6=E8=B7=B3=E8=BF=87=E8=87=AA=E5=AE=9A=E4=B9=89=E5=A4=87?= =?UTF-8?q?=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backup-daemon/data/backup-auto-efi | 7 +++++++ 1 file changed, 7 insertions(+) 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 #这两行要一致