Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

忽略fstab实现跨硬盘还原 #9

Open
wgetnz opened this issue Jan 3, 2025 · 0 comments
Open

忽略fstab实现跨硬盘还原 #9

wgetnz opened this issue Jan 3, 2025 · 0 comments

Comments

@wgetnz
Copy link

wgetnz commented Jan 3, 2025

normal_restore() {
mkdir -p /tmp/upload/restore
# 检查backup.tar.gz文件是否存在
if [ -f /tmp/upload/backup.tar.gz ]; then
tar -xzvf /tmp/upload/backup.tar.gz -C /tmp/upload/restore
cd /tmp/upload/restore
# 恢复overlay,但排除两个位置的fstab文件
tar -xzvf overlay_backup.tar.gz
--exclude="*/etc/config/fstab"
-C /
green "恢复已完成, 系统正在重启....."
reboot
else
red "请将恢复文档backup.tar.gz上传到/tmp/upload目录再重试。"
exit 1
fi
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant