Created
August 7, 2018 05:52
-
-
Save wongsyrone/3c53d91365cc0686e6a8cbd10e391e20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
两台电脑均从救援/备用系统启动,并挂掉原/新根目录到 /mnt。联网并在旧系统启动 sshd,然后: | |
``` | |
rsync -aviHAXKh --partial --delete old_computer:/mnt /mnt | |
``` | |
然后装引导、写引导配置,改 /etc/fstab,重启。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我用 rsync -aAXvP
通过网络传的话可以带 -z 开压缩.
开个exclude文件把不应该备份的目录剔除就可以了. 举例:
/proc/*
/dev/*
/sys/*
/tmp/*
/mnt/*
/media/*
/run/*
/var/lock/*
/var/run/*
/var/lib/pacman/*
/var/cache/pacman/pkg/*
/lost+found
我一直用这个方法定期备份整个/, 还可以用这个备份轻易起一个新的机器用 (只需要chroot进去改fstab(因为我用UUID)和装一下grub)