backup AWS script using rsync and ssh

# rsync -av -e ssh directory_name [email protected]:/Volumes/disk/BK-svr-london # rsync -avz -e ‘ssh -i 遠端的KEY’ 遠端帳號@遠端IP:遠端目錄 近端目錄 # —— —— example: cat #/bin/sh /usr/bin/rsync -avz -e ‘ssh -i /home/xxx/_AWS/key_xxx.pem’ [email protected]:/etc /home/xxx/_AWS/BACKUP /usr/bin/rsync -avz -e ‘ssh -i /home/xxx/_AWS/key_xxx.pem’ [email protected]:/var/www /home/xxx/_AWS/BACKUP /usr/bin/rsync -avz -e ‘ssh -i /home/xxx/_AWS/key_xxx.pem’ [email protected]:/home/ec2-user /home/xxx/_AWS/BACKUP

Amazon / AWS / EC2 linux version

cat /proc/version Linux version ([email protected]) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Sat Feb 19 23:42:04 UTC 2011   file /bin/bash /bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped   cat /proc/cpuinfo   processor : 0 vendor_id : GenuineIntel cpu … Read more

amazon aws ami LAMP / NGINX / PHP / memcache steps

// —– Using NGINX + PHP5-FPM sudo apt-get install nginx php5-fpm php5-mysql cd /etc/init.d/ sudo service apache2 stop sudo update-rc.d -f apache2 remove Install Memcached sudo apt-get install memcached libmemcached-dev php5-memcached php5-memcache // ==================== Getting a new virtual machine up and running from the default AMI is easy. Here’s my cookbook: Install basic services … Read more