Last active
August 29, 2015 14:24
-
-
Save dinhkhanh/645d2989e2356f8ef89a to your computer and use it in GitHub Desktop.
Command line to Backup directories
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
# For full scenario: https://help.ubuntu.com/community/BackupYourSystem/TAR | |
# to backup | |
tar -cvpzf /path/to/save/file/backup.tar.gz --exclude=/path/to/exclude/one --exclude=/path/to/exclude/two/etc --one-file-system /path/is/backed/up | |
# to restore | |
sudo tar -xvpzf /path/to/backup.tar.gz -C /path/to/write/files/to --numeric-owner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment