142904 【江西银行】【grub还原】在grub界面选择restore-retain-userdata mod模式还原,还原之后域用户登录失败

This commit is contained in:
赵民勇 2022-10-09 11:21:56 +08:00
parent 146b8a5695
commit 9d727038e1
4 changed files with 56 additions and 0 deletions

View File

@ -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 :

View File

@ -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

View File

@ -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 :

View File

@ -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 :