Last active
September 15, 2016 06:16
-
-
Save jmakeig/593a4b34c04c91f46621ae50ca048345 to your computer and use it in GitHub Desktop.
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
rsync -e 'ssh' -avlt --delete \ | |
--exclude 'Microsoft User Data' \ | |
--exclude '.parallels-vm-directory' \ | |
--exclude 'Personal' \ | |
--exclude '.DS_Store' \ | |
--exclude '.git/' \ | |
--exclude 'Virtual Machines.localized' \ | |
--exclude 'WebEx' \ | |
--exclude 'Web Receipts' \ | |
--exclude 'Workspaces' \ | |
$* \ | |
/Users/jmakeig/Documents ssh.example.com:"$TARGET" |
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
# <http://explainshell.com/explain?cmd=rsync+-e+%27ssh%27+-avlt+ssh.example.com%3A%2Fhome%2Fjmakeig%2FBACKUP%2FACTIVE%2FDocuments+.> | |
# -n for a trial run | |
# -t preserves file timestamps | |
rsync -e 'ssh' -avlt ssh.example.com:/home/jmakeig/BACKUP/ACTIVE/Documents . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment