ec2-create-snapshot
Syntax
ec2-create-snapshot
volume_id
Description
Creates a snapshot of the current state of an Amazon EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make identical copies of instance devices, and to save data before shutting down an instance.
When taking a snapshot of a file system, we recommend unmounting it first. This ensures the file system metadata is in a consistent state, that the 'mounted indicator' is cleared, and that all applications using that file system are stopped and in a consistent state. Some file systems, such as xfs, can freeze and unfreeze activity so a snapshot can be made without unmounting.
Options
Option | Description | Required |
---|---|---|
| The ID of the volume to snapshot. Example: | Yes |
Output
Amazon EBS returns a table that contains the following information:
SNAPSHOT identifier
ID of the snapshot
ID of the volume
Snapshot state (e.g.,
pending
,completed
)Time stamp when the snapshot was initiated
Amazon EBS displays errors on stderr
.
Example
This example creates a snapshot of volume vol-4d826724
.
PROMPT>
ec2-create-snapshot vol-4d826724
SNAPSHOT snap-78a54011 vol-4d826724 pending 2008-02-15T09:03:58+0000