diff --git a/backup-daemon/customizesystemrestoreproxy.cpp b/backup-daemon/customizesystemrestoreproxy.cpp index 3d0a286..3ddd534 100755 --- a/backup-daemon/customizesystemrestoreproxy.cpp +++ b/backup-daemon/customizesystemrestoreproxy.cpp @@ -251,6 +251,11 @@ QStringList CustomizeSystemRestoreProxy::getRsyncArgs(CustomizeSystemRestoreScen args << "--exclude=/etc/NetworkManager"; args << "--exclude=/var/lib/pam"; + // 安装kylin + args << "--exclude=/usr/share/applications/kylin-os-installer.desktop"; + args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop"; + args << "--exclude=/etc/xdg/autostart/kylin-os-installer.desktop"; + // 此处不要break,因为还需要排除SYSTEM_RESTORE中的项 case CustomizeSystemRestoreScene::SYSTEM_RESTORE : @@ -267,9 +272,6 @@ QStringList CustomizeSystemRestoreProxy::getRsyncArgs(CustomizeSystemRestoreScen // 文件安全箱 args << "--exclude=/data/security-dir"; - // 安装kylin - args << "--exclude=/usr/share/applications/kylin-os-installer.desktop"; - args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop"; for (const QString& item : excludes) { args << QString("--exclude=") + item; diff --git a/backup-daemon/data/backup-auto-efi b/backup-daemon/data/backup-auto-efi index 8a97c8f..3534509 100755 --- a/backup-daemon/data/backup-auto-efi +++ b/backup-daemon/data/backup-auto-efi @@ -1109,6 +1109,9 @@ restoreAuto() { #还原 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/hostname --exclude=/etc/hedron --exclude=/etc/kcm --exclude=/usr/hedron/hedronagent --exclude=/etc/.kyinfo --exclude=/etc/LICENSE" excludes="${excludes} --exclude=/etc/ssl/certs --exclude=/usr/share/ca-certificates --exclude=/etc/NetworkManager --exclude=/var/lib/pam" + excludes="${excludes} --exclude=/usr/share/applications/kylin-os-installer.desktop" + excludes="${excludes} --exclude=*/.local/share/applications/kylin-os-installer.desktop" + excludes="${excludes} --exclude=/etc/xdg/autostart/kylin-os-installer.desktop" #如果是990,排除/data;否则,排除/data/usershare if [ x${is_990_9a0} == x"true" ]; then @@ -1142,8 +1145,6 @@ restoreAuto() { #还原 excludes="${excludes} --exclude=/var/log" excludes="${excludes} --exclude=*/backup/snapshots" excludes="${excludes} --exclude=/data/security-dir" - excludes="${excludes} --exclude=/usr/share/applications/kylin-os-installer.desktop" - excludes="${excludes} --exclude=*/.local/share/applications/kylin-os-installer.desktop" #yi jian huan yuan if [ ! -e "${restoreDir}/data/data" ]; then #这两行要一致 diff --git a/backup-daemon/systemrestoreproxy.cpp b/backup-daemon/systemrestoreproxy.cpp index 55f2ef1..f016491 100755 --- a/backup-daemon/systemrestoreproxy.cpp +++ b/backup-daemon/systemrestoreproxy.cpp @@ -266,6 +266,11 @@ QStringList SystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene) args << "--exclude=/etc/NetworkManager"; args << "--exclude=/var/lib/pam"; + // 安装kylin + args << "--exclude=/usr/share/applications/kylin-os-installer.desktop"; + args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop"; + args << "--exclude=/etc/xdg/autostart/kylin-os-installer.desktop"; + // 此处不要break,因为还需要排除SYSTEM_RESTORE中的项 case SystemRestoreScene::SYSTEM_RESTORE : @@ -282,9 +287,6 @@ QStringList SystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene) // 文件安全箱 args << "--exclude=/data/security-dir"; - // 安装kylin - args << "--exclude=/usr/share/applications/kylin-os-installer.desktop"; - args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop"; // 以前的出厂备份和grub备份没有备份/data,还原时需要判断/data是否存在,如不存在需要屏蔽掉,不然会将主机上的/data删除,造成问题 // 此为兼容以前备份的老数据而改,等以后老的备份估计不存在了可已去掉 diff --git a/backup-daemon/udisksystemrestoreproxy.cpp b/backup-daemon/udisksystemrestoreproxy.cpp index cc4a7c8..bec4fe2 100755 --- a/backup-daemon/udisksystemrestoreproxy.cpp +++ b/backup-daemon/udisksystemrestoreproxy.cpp @@ -269,6 +269,11 @@ QStringList UDiskSystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene) args << "--exclude=/etc/NetworkManager"; args << "--exclude=/var/lib/pam"; + // 安装kylin + args << "--exclude=/usr/share/applications/kylin-os-installer.desktop"; + args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop"; + args << "--exclude=/etc/xdg/autostart/kylin-os-installer.desktop"; + // 此处不要break,因为还需要排除SYSTEM_RESTORE中的项 case SystemRestoreScene::SYSTEM_RESTORE : @@ -285,9 +290,6 @@ QStringList UDiskSystemRestoreProxy::getRsyncArgs(SystemRestoreScene scene) // 文件安全箱 args << "--exclude=/data/security-dir"; - // 安装kylin - args << "--exclude=/usr/share/applications/kylin-os-installer.desktop"; - args << "--exclude=*/.local/share/applications/kylin-os-installer.desktop"; // 以前的出厂备份和grub备份没有备份/data,还原时需要判断/data是否存在,如不存在需要屏蔽掉,不然会将主机上的/data删除,造成问题 // 此为兼容以前备份的老数据而改,等以后老的备份估计不存在了可已去掉 diff --git a/debian/yhkylin-backup-tools.install b/debian/yhkylin-backup-tools.install index 3275f03..a215560 100644 --- a/debian/yhkylin-backup-tools.install +++ b/debian/yhkylin-backup-tools.install @@ -10,4 +10,5 @@ backup-daemon/data/initramfs-tools/hooks/kybackup-hooks usr/share/initramfs-too backup-daemon/data/initramfs-tools/scripts/local-bottom/kybackup usr/share/initramfs-tools/scripts/init-bottom backup-daemon/data/initramfs-tools/conf-hooks.d/kybackup usr/share/initramfs-tools/conf-hooks.d kybackup/yhkylin-backup-tools.desktop usr/share/applications/ +backup-daemon/backup-daemon.desktop usr/share/applications/ data/kybackup/* usr/share/kylin-user-guide/data/guide/kybackup