Importing a Snapshot from a Bucket

You can import a snapshot to your account from an S3-compatible bucket.

This enables you, for example, to retrieve a backup of a snapshot or to copy it between accounts in different Regions. 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 import a snapshot, you need to specify the pre-signed URL for it. For more information, see Configuring a Pre-Signed URL.

Importing a Snapshot from a Bucket Using Cockpit v2

Before you begin: Get the pre-signed URL of the snapshot. To do so, you need to have access to the bucket in which the snapshot is stored. For more information, see Configuring an Object ACL and Configuring a Pre-Signed URL.

  1. In the Snapshots dashboard, click IconImport Import Snapshot.
    The IMPORT SNAPSHOT dialog box appears.

  2. In the Name field, type a name for the snapshot.

  3. (optional) In the Description field, type a description for the snapshot.

  4. In the Object Pre-signed URL, type the pre-signed URL of the snapshot in the bucket.

  5. In the Snapshot Size field, type the size of the copy of the snapshot in your account in bytes.

    This size must be greater than or equal to the size of the original uncompressed snapshot.

  6. Click Import.
    A copy of the snapshot is imported to your account.

Importing a Snapshot from a Bucket Using OSC CLI

Before you begin: Get the pre-signed URL of the snapshot. To do so, you need to have access to the bucket in which the snapshot is stored. For more information, see Configuring an Object ACL and Configuring a Pre-Signed URL.

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 a 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: Importing from a bucket
$ osc-cli api CreateSnapshot --profile "default" \
    --FileLocation "https://oos.eu-west-2.outscale.com/BUCKET/KEY?AWSAccessKeyId=ABCDEFGHIJ0123456789&Expires=1493372309&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
    --SnapshotSize 10737418240 \
    --Description "Snapshot imported from a bucket"

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.

  • FileLocation: (optional) (when importing from a bucket) The pre-signed URL of the snapshot you want to import, or the normal URL of the snapshot if you have permission on the OOS bucket. For more information, see Configuring a Pre-signed URL or Managing Access to Your Buckets and Objects.

  • SnapshotSize: (optional) (when importing from a bucket) The size of the snapshot you want to create in your account, in bytes. This size must be greater than or equal to the size of the original, uncompressed snapshot.

The CreateSnapshot command returns the following elements:

  • ResponseContext: Information about the context of the response.

  • Snapshot: Information about the snapshot.

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

Related Pages

Corresponding API Methods