Created
October 22, 2013 18:26
-
-
Save kparrish/7105506 to your computer and use it in GitHub Desktop.
Remote Backup
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 backup, see www.linux.com/learn/tutorials/284789-writing-a-simple-bash-script- | |
SOURCEDIR1=/home/user | |
DESTDIR1=user@hostname:/path/to/folder | |
rsync -az --progress --exclude='*.bak' --rsh 'ssh ' $SOURCEDIR1 $DESTDIR1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
What to do if you have multiple directories under SOURCEDIR ?