| Did this page help you? Yes No Tell us about it... |
Creates a snapshot 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. For more information about Amazon EBS, go to the Amazon Elastic BLock Store.
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.
For Linux/UNIX, enter the following command from the command line to unmount the volume.
umount -d device_nameFor example:
umount -d /dev/sdh
For Windows, open Disk Management, right-click the volume to unmount, and select Change Drive Letter and Path. Then, select the mount point to remove and click Remove.
The short version of this command is ec2addsnap.
ec2-create-snapshot
volume_id [-d description]
| Name | Description | Required |
|---|---|---|
|
|
The ID of the Amazon EBS volume of which to take a snapshot. Type: String Default: None Example: vol-4d826724 |
Yes |
|
|
Description of the Amazon EBS snapshot. Type: String Default: None Constraints: Up to 255 characters Example: -d "Daily backup" |
No |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
The command returns a table that contains the following information:
SNAPSHOT identifier
ID of the snapshot
ID of the volume
Snapshot state (e.g., pending, completed, error)
Time stamp when snapshot initiated
ID of the owner
Size of the volume
Description
Amazon EC2 command line tools display errors on stderr.
This example creates a snapshot of volume vol-4d826724.
PROMPT>ec2-create-snapshot vol-4d826724 --description "Daily Backup"SNAPSHOT snap-c070c5a9 vol-9539dcfc pending 2009-09-16T14:31:29+0000 999988887777 1 Daily Backup