Skip to content

Instantly share code, notes, and snippets.

@johnliu55tw
Created May 28, 2018 16:07
Show Gist options
  • Save johnliu55tw/9db460b3b4a129a3ab91c02b0b4af2d5 to your computer and use it in GitHub Desktop.
Save johnliu55tw/9db460b3b4a129a3ab91c02b0b4af2d5 to your computer and use it in GitHub Desktop.
Full system backup/restore

Full System Backup and Restore

Refer to Rsync#Full_system_backup for details.

Backup

# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder

Restore

# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /path/to/backup /destination/root/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment