Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to Digg

CreateSnapshot

Description

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 Compute Cloud User Guide.

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_name

For 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.

Request Parameters

NameDescriptionRequired

VolumeId

The ID of the Amazon EBS volume of which to take a snapshot.

Type: String

Default: None

Yes

Description

Description of the Amazon EBS snapshot.

Type: String

Default: None

Constraints: Up to 255 characters

No

Response Elements

The elements in the following table come wrapped in a CreateSnapshotResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

snapshotId

The ID of the snapshot.

Type: xsd:string

volumeId

The ID of the volume.

Type: xsd:string

status

Snapshot state

Type: xsd:string

Valid Values: pending | completed | error

startTime

Time stamp when the snapshot was initiated.

Type: xsd:dateTime

progress

The progress of the snapshot, in percentage.

Type: xsd:string

ownerId

The AWS account ID of the Amazon EBS snapshot owner.

Type: xsd:string

volumeSize

The size of the volume, in GiB.

Type: xsd:string

description

Description of the snapshot.

Type: xsd:string

Examples

Example Request

This example creates a snapshot of volume vol-4d826724.

https://ec2.amazonaws.com/?Action=CreateSnapshot
&VolumeId=vol-4d826724
&Description=Daily+Backup
&AuthParams

Example Response

<CreateSnapshotResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
  <snapshotId>snap-78a54011</snapshotId>
  <volumeId>vol-4d826724</volumeId>
  <status>pending</status>
  <startTime>2008-05-07T12:51:50.000Z</startTime>
  <progress>60%</progress>
  <ownerId>213457642086</ownerId>
  <volumeSize>10</volumeSize>
  <description>Daily Backup</description>
</CreateSnapshotResponse>