Last active
September 16, 2015 14:46
-
-
Save stevekm/0477d0073998d882910a to your computer and use it in GitHub Desktop.
Use rsync to backup all your data from a remote server
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
#!/bin/bash | |
rsync -avzheR --progress --max-size=500K -e "ssh -p 22" [email protected]:/home/user/ /home/user/ServerBackups/ | |
# "ssh -p 22" = connect via ssh, port 22 | |
# -a, --archive archive mode; same as -rlptgoD (no -H) | |
# -v, --verbose increase verbosity | |
# -z, --compress compress file data during the transfer | |
# -h, --human-readable output numbers in a human-readable format | |
# -e, --rsh=COMMAND specify the remote shell to use | |
# -R, --relative use relative path names | |
# rsync /source/ /destination/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment