backup AWS script using rsync and ssh

# rsync -avz -e ‘ssh -i 遠端的KEY’ 遠端帳號@遠端IP:遠端目錄 近端目錄 # —— —— example: cat RUN_backup_aws.sh #/bin/sh /usr/bin/rsync -avz -e ‘ssh -i /home/xxx/_AWS/key_xxx.pem’ ec2-user@www.monster.com.tw:/etc /home/xxx/_AWS/BACKUP /usr/bin/rsync -avz -e ‘ssh -i /home/xxx/_AWS/key_xxx.pem’ ec2-user@www.monster.com.tw:/var/www /home/xxx/_AWS/BACKUP /usr/bin/rsync -avz -e ‘ssh -i /home/xxx/_AWS/key_xxx.pem’ ec2-user@www.monster.com.tw:/home/ec2-user /home/xxx/_AWS/BACKUP