Snapshots are a way to backup your volumes.
There are no labs specifically on taking snapshots in the course. In my opinion it would be a reasonable lab for an introductory course.
A good way of understanding snapshots is to try it.
- Take snapshot1
- Make a change
- Take snapshot2 (this is incremental i.e. only changed blocks)
- Delete snapshot1
- Restore using the second snapshot.
Behind the scenes, when you deleted the first snapshot, AWS will ensure that the second snapshot contains all the blocks required for it to be fully usable.
To try it:
Launch an instance. I used Windows.
Navigate to Volumes>Snapshots
Take a snapshot
Make a change. I made a new folder on the desktop.
Take another snapshot. The snapshot will be incremental i.e. it will only contain the changed blocks since the first snapshot.
Now for the magic bit. Delete the first snapshot. Behind the scenes, AWS will ensure that the second snapshot contains all the blocks required for the second snapshot to be fully usable.
Stop the instance and detach the volume from it.
Create a volume from the second snapshot and attach it to the instance.
Ignore the instructions about the recommended device names in the window below, and use /dev/sda1. This makes it the root volume.
Start the instance.
It will be restored to the point at which you took the first snapshot.
As you know, snapshots are stored in S3, but not in any bucket you can see. It is also difficult to know exactly how much space is being used by snapshots. People are concerned that if they take frequent snapshot this will result in a large bill. One approach to this is to script the creation of snapshots, for example to take a daily snapshot and then delete all the older snapshots.