To run an EBS snapshot restore, you take a point-in-time snapshot of an Amazon EBS volume with aws ec2 create-snapshot, wait for it to reach the completed state, and then create a new volume from it with aws ec2 create-volume --snapshot-id. The new volume can be in any Availability Zone of the same Region, attached to any instance, and mounted like a normal disk. Snapshots are incremental and stored by AWS in managed S3 storage, so you pay only for changed blocks after the first one.
This guide covers taking snapshots, restoring them, copying them to other Regions, automating them and the pitfalls that surprise people the first time.
An EBS snapshot is a point-in-time copy of the blocks on a volume. The first snapshot of a volume copies every written block. Each later snapshot stores only the blocks that changed since the previous one, but every snapshot is still a complete restore point: AWS keeps the references so you can delete any snapshot in the chain without breaking the others.
| Property | Behaviour |
|---|---|
| Scope | Regional. Snapshots are not tied to an Availability Zone. |
| Storage | AWS-managed S3. You do not see a bucket for it. |
| Billing | Per GB-month of stored changed data. |
| Encryption | A snapshot of an encrypted volume is encrypted with the same KMS key. |
| Consistency | Crash-consistent: the state of the disk as if power was cut at that moment. |
The snapshot captures only data that has reached the volume. Anything an application still holds in memory or in the operating system page cache is not included.
Find the volume ID, then create the snapshot and tag it so you can find it later.
The call returns immediately with a snapshot ID and a state of pending. The volume stays usable while the snapshot is created, though the first snapshot can slightly raise latency on busy volumes. Wait for completion before relying on it:
For a database or any application with files being written, a crash-consistent snapshot may need recovery on restore. For a cleaner copy, flush and pause writes first:
sync, and on a data-only filesystem run sudo fsfreeze -f /data.pending state with the point in time fixed. Then run sudo fsfreeze -u /data.If an instance has several volumes that must be consistent with each other, use aws ec2 create-snapshots --instance-specification InstanceId=i-0123... to snapshot all of them at the same moment.
You never restore "into" an existing volume. You create a new volume from the snapshot, then attach it. The Availability Zone must match the instance you attach it to.
Then, on the instance, mount it. A volume created from a snapshot already contains a filesystem, so do not run mkfs: that would erase it.
On Nitro-based instances the device shows up as /dev/nvme1n1 rather than /dev/sdf, so confirm with lsblk. You can choose a different volume type, size (equal or larger) or IOPS than the original when restoring. If you enlarge the volume, grow the filesystem afterwards, for example with xfs_growfs or resize2fs.
To roll back a root disk, stop the instance, detach the root volume, attach the restored volume as the same device name (/dev/xvda or /dev/sda1) and start it again. AWS also offers a replace-root-volume operation that does this from a snapshot in one step.
A volume restored from a snapshot is usable at once, but its blocks are fetched from S3 the first time you read them. Those first reads are slower than later ones, which hurts a freshly restored database.
You have two options:
sudo fio --filename=/dev/nvme1n1 --rw=read --bs=1M --iodepth=32 --ioengine=libaio --direct=1 --name=init.Because snapshots are regional, copy one to move data to another Region or to use a different KMS key:
You can share a snapshot with specific accounts using modify-snapshot-attribute. An encrypted snapshot can be shared only if it uses a customer managed KMS key that the other account is allowed to use. Never make a snapshot public if it contains anything private.
For routine backups, do not write cron jobs. Use Amazon Data Lifecycle Manager (DLM) or AWS Backup. A DLM policy selects volumes by tag, creates snapshots on a schedule, keeps a set number and deletes the rest. The snapshot archive tier stores rarely needed snapshots at a lower price with a minimum retention period and a slower restore. The Recycle Bin can keep deleted snapshots for a retention period you set, so an accidental delete is recoverable.
The volume stays online while the snapshot runs. Performance impact is usually small, but the first snapshot of a large, busy volume can add some latency, so schedule it off-peak when you can.
Blocks are loaded lazily from S3 on first access. Pre-warm the volume with a full read, or enable fast snapshot restore for the Availability Zone.
Yes for another Availability Zone in the same Region: set --availability-zone on create-volume. For another Region, copy the snapshot there first.
AWS keeps any blocks that later snapshots still reference. Only data unique to the deleted snapshot is freed, so every remaining snapshot still restores fully.
Create snapshots with create-snapshot, wait for completed, and restore by making a new volume with create-volume --snapshot-id in the target Availability Zone, then attach and mount it without formatting. Snapshots are incremental, regional and crash-consistent, so quiesce writes when consistency matters. Use fast snapshot restore for performance-critical restores, copy-snapshot for other Regions, and DLM or AWS Backup to automate retention.