|
/Hosting/Amazon/EBS:
Amazon Backups: Snapshotting EBS to S3
Amazon "Compute Cloud" services are setup such that storage for a running server is kept on an EBS ("Elastic Block Storage") volume mounted on the server. Long-term, offsite (geographic redundancy across multiple data centers) storage is kept in S3. There is a function to snapshot an EBS volume into S3.
List the volumes associated with your account:
ec2-describe-volumes
This will also show what volumes are mounted on which servers. Stop the services running on the server that might be writing to the EBS (databases in particular, if you wish to have a usable backup):
/etc/init.d/apache2 stopCreate a snapshot:
/etc/init.d/mysql stop
ec2-create-snapshot vol-3159bd58Check status of snapshot:
ec2-describe-snapshotsRestart services:
SNAPSHOT snap-e309e38a vol-3159bd58 completed
/etc/init.d/mysql start
/etc/init.d/apache2 start
To restore file(s) from one of the backup snapshots, simply create a new volume from the chosen snapshot. Attach it to instance of your running server. Mount the volume temporarily on the server and grab your files. Then unmount the volume, detach it, and delete it. A process that takes only a couple minutes, especially if you use the extremely convenient Firefox ElasticFox plugin[1][2].
[1] http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609
[2] http://s3.amazonaws.com/ec2-downloads/elasticfox.xpi
posted at: 06:33 | path: /Hosting/Amazon/EBS | permanent link to this entry