Last active
September 6, 2016 00:05
-
-
Save snehesht/1d56d7ad78eea6cd72141fd2bef94f64 to your computer and use it in GitHub Desktop.
System backup and restore with rsync
This file contains hidden or 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
#!/usr/bin/env bash | |
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","lost+found"} --delete /* /backup/$(date -I) |
This file contains hidden or 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
#!/usr/bin/env bash | |
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","lost+found"} --delete /backup/#DATE/* / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment