Created
June 7, 2012 18:58
-
-
Save davidvanvickle/2890812 to your computer and use it in GitHub Desktop.
rsync notes
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 notes | |
# TRY WITH TEST ACCOUNTS FIRST | |
# based on | |
# http://www.cyberciti.biz/tips/linux-use-rsync-transfer-mirror-files-directories.html | |
# ------- | |
# Goal: download data (including folders) from a remote server | |
# download files | |
rsync -r -a -v -e "ssh -l remote-user" 1.2.3.4:/home/remote-user/ /Users/local-user/Desktop/backupfolder/ | |
# download files destructively | |
rsync -r -a -v -e "ssh -l remote-user" --delete 1.2.3.4:/home/remote-user/ /Users/local-user/Desktop/backupfolder/ | |
# ------- | |
# Goal: upload data (including folders) to a remote server | |
# UPload files | |
rsync -r -a -v -e "ssh -l remote-user" /Users/local-user/Desktop/backupfolder/ 1.2.3.4:/home/remote-user/ | |
# UPload files destructively | |
rsync -r -a -v -e "ssh -l remote-user" --delete /Users/local-user/Desktop/backupfolder/ 1.2.3.4:/home/remote-user/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment