wynemo
10/28/2012 - 11:24 AM

运维

运维

# .ssh/config/

Host ubuntu12
    User user1 
    HostName  192.168.56.2
    IdentityFile ~/.ssh/id_rsa

Host superlinode
    User user2 
    HostName dabin.info 
    Port 8888
    IdentityFile ~/.ssh/linode_rsa
    ProxyCommand ssh ubuntu12 nc %h %p
#/tmp/foo_dir -> ubuntu12:/tmp/foo_dir/
#--delete                delete extraneous files from destination dirs
#--delete-excluded       also delete excluded files from destination dirs
#--exclude=PATTERN       exclude files matching PATTERN
rsync -avzP --delete --exclude=".svn" --delete-excluded /tmp/foo_dir/ ubuntu12:/tmp/foo_dir/