Copying a Snapshot in the Same Region

You can copy a snapshot in your account, or from an account in the same Region for which you have the appropriate permission.

The copy of the snapshot belongs to you, is independent from the source snapshot, and gets its own ID. You can create volumes or OUTSCALE machine images (OMIs) from it, share it with other accounts, or delete it.

To create a backup of a snapshot in an OUTSCALE Object Storage (OOS) bucket, see Exporting a Snapshot to a Bucket. To copy an OUTSCALE Machine Image OMI, see Tutorial: Copying an OMI.

To copy a snapshot between accounts in different Regions, see Tutorial: Copying a Snapshot to a Different Region.

Copying a Snapshot in the Same Region Using OSC CLI

Before you begin: The owner of the other account must grant you the appropriate permission to access and copy the snapshot. For more information, see Managing Permissions for a Snapshot.

The CreateSnapshot command creates a snapshot. Snapshots are point-in-time images of a volume that you can use to back up your data or to create replicas of this volume.
You can use this method in three different ways:

  • Creating from a volume: You create a snapshot from one of your volumes.

  • Copying a snapshot: You copy an existing snapshot. The source snapshot can be one of your own snapshots, or a snapshot owned by another account that has granted you permission via the UpdateSnapshot method.

  • Importing from a bucket: You import a snapshot located in an OUTSCALE Object Storage (OOS) bucket. First, the owner of the source snapshot must export it to the bucket by using the CreateSnapshotExportTask method. Then, they must grant you permission to read the snapshot via a pre-signed URL or Access Control Lists. For more information, see [Managing Access to Your Buckets and Objects].

In case of excessive use of the snapshot creation feature on the same volume over a short period of time, 3DS OUTSCALE reserves the right to temporarily block the feature.

For more information, see About Snapshots.

Request sample: Copying a snapshot
$ osc-cli api CreateSnapshot --profile "default" \
    --SourceSnapshotId "snap-12345678" \
    --SourceRegionName "eu-west-2" \
    --Description "Snapshot created from another snapshot"

This command contains the following attributes that you need to specify:

  • Description: (optional) A description for the snapshot.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • SourceRegionName: (optional) (when copying a snapshot) The name of the source Region, which must be the same as the Region of your account.

  • SourceSnapshotId: (optional) (when copying a snapshot) The ID of the snapshot you want to copy.

The CreateSnapshot command returns the following elements:

  • ResponseContext: Information about the context of the response.

  • Snapshot: Information about the snapshot.

Result sample: Copying a snapshot
{
  "Snapshot": {
    "VolumeSize": 10,
    "AccountId": "123456789012",
    "VolumeId": "vol-12345678",
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "PermissionsToCreateVolume": {
      "GlobalPermission": false,
      "AccountIds": []
    },
    "Progress": 100,
    "SnapshotId": "snap-12345678",
    "State": "completed",
    "Description": "Snapshot copied from another snapshot",
    "Tags": []
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Copying a Snapshot in the Same Region Using AWS CLI

Before you begin: The owner of the other account must grant you the appropriate permission to access and copy the snapshot. For more information, see Managing Permissions for a Snapshot.

To copy a snapshot to your account, use the copy-snapshot command following this syntax:

Request Sample
$ aws ec2 copy-snapshot \
    --profile YOUR_PROFILE \
    --source-region eu-west-2 \
    --source-snapshot-id snap-12345678 \
    --destination-region eu-west-2 \
    --description snapshot of vol-87654321 \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • source-region: The name of the Region where the snapshot you want to copy is.

  • source-snapshot-id: The ID of the snapshot you want to copy.

  • destination-region: The name of the destination Region, which must be the same as the source Region.

  • (optional) description: A description for the copy of the snapshot.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The copy-snapshot command returns the following element:

  • SnapshotId: The ID of the copy of the snapshot.

Result Sample
{
"SnapshotId": "snap-87654321"
}

The snapshot is copied to your account.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.