锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
rsync --progress --avze ssh --delete srcDir/ remoteName@remoteMachine:remoteDir/
-a quick way to specify the recursion and preserve everything.
-v verbose
-z compress
And then change ssh with no password:
Create the private keys for local machine:
Copy the local keys to remote machine:ssh-keygen -t dsa
Do not set the password. ssh-copy-id -i ~/.ssh/id_dsa.pub remoteuser@remotebox
After that, add an alias into your .bashrc
alias bp='. ~/backup.sh'
So you can run bp directly to backup all things.
Over ~~~
]]>
]]>