Exporting a Snapshot to a Bucket

You can export a snapshot to an OUTSCALE Object Storage (OOS) bucket to create a backup, or to enable other accounts to copy it. You can export snapshots in QCOW2 or RAW format.

The snapshot can then be imported to an account using a pre-signed URL. For more information, see Creating a Pre-Signed URL.

Before exporting an OMI or a snapshot to another Region, you need to make sure that this action is authorized by all applicable third-party licenses. If the export is authorized, only an OMI export guarantees the application of third-party licenses in the target Region, whereas a snapshot export does not.

Exporting a Snapshot to a Bucket Using Cockpit v2

  1. In the Snapshots dashboard, check the box of the snapshot you want to export to an OOS bucket.
    The snapshot is selected.

  2. Click IconExport Export to OOS.
    The EXPORT SNAPSHOT TO OOS BUCKET dialog box appears.

  3. Specify the information for the export:

    1. From the Disk image format list, select the format of the export disk (QCOW2 or RAW).

    2. In the OOS bucket name field, type the name of the OOS bucket.

      You must have the appropriate write permission for the bucket where you want to export the snapshot. For more information, see Managing Access to Your Buckets.

    3. (optional) In the Bucket prefix field, type a prefix for the copy of the snapshot in the OOS bucket.
      For more information about prefixes, see About OOS > Objects.

  4. Click Export.
    A copy of the snapshot is exported to the OOS bucket.

Exporting a Snapshot to a Bucket Using OSC CLI

The CreateSnapshotExportTask command exports a snapshot to an OUTSCALE Object Storage (OOS) bucket that belongs to you. This action enables you to create a backup of your snapshot.

You can share this snapshot with others accounts by granting permission to read it via pre-signed URLs. For more information, see Creating a Pre-Signed URL.

For more information, see About Snapshots.

Request sample
$ osc-cli api CreateSnapshotExportTask --profile "default" \
    --SnapshotId "snap-12345678" \
    --OsuExport '{
        "DiskImageFormat": "qcow2",
        "OsuBucket": "BUCKET",
        "OsuPrefix": "PREFIX"
      }'

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

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

  • OsuExport: Information about the OOS export task to create.

    • DiskImageFormat: The format of the export disk (qcow2 | raw).

    • OsuApiKey: (optional) Information about the OOS API key.

      • ApiKeyId: (optional) The API key of the OOS account that enables you to access the bucket.

      • SecretKey: (optional) The secret key of the OOS account that enables you to access the bucket.

    • OsuBucket: The name of the OOS bucket where you want to export the object.

    • OsuManifestUrl: (optional) The URL of the manifest file.

    • OsuPrefix: (optional) The prefix for the key of the OOS object.

  • SnapshotId: The ID of the snapshot to export.

The CreateSnapshotExportTask command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • SnapshotExportTask: Information about the snapshot export task.

    • Comment: If the snapshot export task fails, an error message appears.

    • OsuExport: Information about the snapshot export task.

      • DiskImageFormat: The format of the export disk (qcow2 | raw).

      • OsuBucket: The name of the OOS bucket the snapshot is exported to.

      • OsuPrefix: The prefix for the key of the OOS object corresponding to the snapshot.

    • Progress: The progress of the snapshot export task, as a percentage.

    • SnapshotId: The ID of the snapshot to be exported.

    • State: The state of the snapshot export task (pending | active | completed | failed).

    • Tags: One or more tags associated with the snapshot export task.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • TaskId: The ID of the snapshot export task.

Result sample
{
  "SnapshotExportTask": {
    "Tags": [],
    "TaskId": "snap-export-12345678",
    "Comment": "Export of snapshot snap-12345678",
    "OsuExport": {
      "OsuPrefix": "PREFIX",
      "OsuBucket": "BUCKET",
      "DiskImageFormat": "qcow2"
    },
    "State": "pending",
    "SnapshotId": "snap-12345678",
    "Progress": 0
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Related Pages

Corresponding API Methods