This article is linked to the previous article Your Data In the Cloud. The following backup strategy is only available for instances whose root devices are stored on EBS. With AWS Management Console, you can graphically create an AMI from your instance; this will allow you to backup all its volumes. You can also backup independently some volumes using snapshots.
Creating an EBS-backed AMI
AMI Creation
- Select your instance, click on Instance Actions => Create Image (EBS AMI).
- Provide a name for your AMI as well as an optional description.
- Your instance will then be stopped. The AMI creation process could take a while (~10 min). Hit Refresh in the AMIs section : the creation of your AMI is completed once its status moves from Pending to Available.
Note that a snapshot (section Snapshots) has been created for each of the volumes required by this AMI.
Launching an instance from the EBS-backed AMI created earlier
- Go to the Instances section and click Launch Instance.
- Click on the MyAMIs tab. Select the AMI created earlier and follow the guidance.
- Once the process completed, you should see as many new volumes for your instance as the number of snapshots generated during the AMI creation process. Your instance should start automatically.
Pros and Cons
The AWS Management Console allows you, via the AMI creation process :
- to create and restore full Instance Backup easily (graphical interface).
- to obtain consistent backups as the machine is stopped during the AMI creation.
- makes it really easy for a backup AMI (or an associated snapshot) to be destroyed (human mistake).
- stores the image on an S3 bucket. However, we at Nimble Apps haven’t found a way so far to access this S3 volume and download the AMI. It that were really impossible, it would mean that your backup is only stored by Amazon, i.e. that you cannot host your backups with this method.
but it also :
Using snapshots to backup an independent volume
Should you want to backup only one volume and not the full list of volumes related to one instance, you could also do it through the snapshot process.
Snapshot creation process
The snapshot creation process is not a cold backup by default : you could snapshot an in-use volume. This could lead to data inconsistencies. To prevent this, we can detach the volume before creating the associated snapshot :
- Log in your server, detach the volume you want to backup. For example :
umount /dev/sdg - Back in AWS Management Console, go in the Volume section, select the associated volume and click Detach. This step dissociates the volume from the instance.
- Go in the Snapshot section, click the Create Snapshot button, select your volume and click the Create button. You just created a backup of your volume.
- Go back to the Volume section and attach the volume back to your instance (use the same device name).
- Log back in your server and re-attach the volume. For example :
mount /dev/sdg
Volume restoration from snapshot
- Go in the Snapshot section, right-click on your snapshot and click on Create Volume from Snapshot.
- A new volume should appear in the Volume section, attach it to your instance.
- Log in your instance and mount the new volume.
Pros and Cons
The AWS Management Console allows you, via the snapshot creation process :
- to create independent volume backups or restore them easily (Graphical Interface).
- to obtain consistent backups if the volume is detached before the snapshot creation.
- makes it really easy for a snapshot to be destroyed (human mistake).
- stores the snapshots on a S3 bucket. However, again, we could not find a way to access this S3 volume and download the snapshots. If confirmed, such an impossibility would mean that your backups are stored by Amazon only, i.e. that you cannot host your backups with this method.
but it also :
English
Français 