diff --git a/backup-daemon/customizesystemrestoreproxy.cpp b/backup-daemon/customizesystemrestoreproxy.cpp index 1dfe3d1..74c6bf7 100755 --- a/backup-daemon/customizesystemrestoreproxy.cpp +++ b/backup-daemon/customizesystemrestoreproxy.cpp @@ -228,6 +228,23 @@ QStringList CustomizeSystemRestoreProxy::getRsyncArgs(CustomizeSystemRestoreScen // 云桌面背景路径属于用户数据 args << "--exclude=/var/lib/AccountsService"; + + // 域用户相关信息,还原后保持不退域 + args << "--exclude=/etc/sssd"; + args << "--exclude=/var/lib/sss"; + args << "--exclude=/usr/share/sssd"; + args << "--exclude=/etc/ipa"; + args << "--exclude=/etc/krb5.keytab"; + args << "--exclude=/etc/krb5.conf"; + args << "--exclude=/var/lib/ipa-client"; + args << "--exclude=/etc/nsswitch.conf"; + args << "--exclude=/etc/pam.d"; + args << "--exclude=/etc/hosts"; + args << "--exclude=/etc/hostname"; + args << "--exclude=/etc/hedron"; + args << "--exclude=/etc/kcm"; + args << "--exclude=/usr/hedron/hedronagent"; + // 此处不要break,因为还需要排除SYSTEM_RESTORE中的项 case CustomizeSystemRestoreScene::SYSTEM_RESTORE : diff --git a/backup-daemon/data/backup-auto-efi b/backup-daemon/data/backup-auto-efi index 55dbcdb..13fc52c 100755 --- a/backup-daemon/data/backup-auto-efi +++ b/backup-daemon/data/backup-auto-efi @@ -1098,6 +1098,10 @@ restoreAuto() { #还原 excludes="${excludes} --exclude=/etc/sudoers" fi excludes="${excludes} --exclude=/home --exclude=/root --exclude=/data/home --exclude=/data/root --exclude=/var/lib/AccountsService" + #下面是域用户相关信息,保留用户数据还原后不退域 + excludes="${excludes} --exclude=/etc/sssd --exclude=/var/lib/sss --exclude=/usr/share/sssd --exclude=/etc/ipa --exclude=/etc/krb5.keytab" + excludes="${excludes} --exclude=/etc/krb5.conf --exclude=/var/lib/ipa-client --exclude=/etc/nsswitch.conf --exclude=/etc/pam.d --exclude=/etc/hosts" + excludes="${excludes} --exclude=/etc/hedron --exclude=/etc/hedron --exclude=/etc/kcm --exclude=/usr/hedron/hedronagent" #如果是990,排除/data;否则,排除/data/usershare if [ x${is_990_9a0} == x"true" ]; then @@ -1128,6 +1132,7 @@ restoreAuto() { #还原 if [ ! -e "${restoreDir}/data/boot/efi" ]; then excludes="${excludes} --exclude=/boot/efi" fi + excludes="${excludes} --exclude=/var/log" excludes="${excludes} --exclude=*/backup/snapshots" #yi jian huan yuan if [ ! -e "${restoreDir}/data/data" ]; then diff --git a/backup-daemon/systemrestoreproxy.cpp b/backup-daemon/systemrestoreproxy.cpp index 6f8ca32..3dab459 100755 --- a/backup-daemon/systemrestoreproxy.cpp +++ b/backup-daemon/systemrestoreproxy.cpp @@ -243,6 +243,23 @@ QStringList SystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene) // 云图片作为桌面背景的路径属于用户数据 args << "--exclude=/var/lib/AccountsService"; + + // 域用户相关信息,还原后保持不退域 + args << "--exclude=/etc/sssd"; + args << "--exclude=/var/lib/sss"; + args << "--exclude=/usr/share/sssd"; + args << "--exclude=/etc/ipa"; + args << "--exclude=/etc/krb5.keytab"; + args << "--exclude=/etc/krb5.conf"; + args << "--exclude=/var/lib/ipa-client"; + args << "--exclude=/etc/nsswitch.conf"; + args << "--exclude=/etc/pam.d"; + args << "--exclude=/etc/hosts"; + args << "--exclude=/etc/hostname"; + args << "--exclude=/etc/hedron"; + args << "--exclude=/etc/kcm"; + args << "--exclude=/usr/hedron/hedronagent"; + // 此处不要break,因为还需要排除SYSTEM_RESTORE中的项 case SystemRestoreScene::SYSTEM_RESTORE : diff --git a/backup-daemon/udisksystemrestoreproxy.cpp b/backup-daemon/udisksystemrestoreproxy.cpp index f8d2bb7..cf32b78 100755 --- a/backup-daemon/udisksystemrestoreproxy.cpp +++ b/backup-daemon/udisksystemrestoreproxy.cpp @@ -246,6 +246,23 @@ QStringList UDiskSystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene) // 云桌面背景路径属于用户数据 args << "--exclude=/var/lib/AccountsService"; + + // 域用户相关信息,还原后保持不退域 + args << "--exclude=/etc/sssd"; + args << "--exclude=/var/lib/sss"; + args << "--exclude=/usr/share/sssd"; + args << "--exclude=/etc/ipa"; + args << "--exclude=/etc/krb5.keytab"; + args << "--exclude=/etc/krb5.conf"; + args << "--exclude=/var/lib/ipa-client"; + args << "--exclude=/etc/nsswitch.conf"; + args << "--exclude=/etc/pam.d"; + args << "--exclude=/etc/hosts"; + args << "--exclude=/etc/hostname"; + args << "--exclude=/etc/hedron"; + args << "--exclude=/etc/kcm"; + args << "--exclude=/usr/hedron/hedronagent"; + // 此处不要break,因为还需要排除SYSTEM_RESTORE中的项 case SystemRestoreScene::SYSTEM_RESTORE :