Exporter un snapshot sur un bucket

Vous pouvez exporter un snapshot sur un bucket OUTSCALE Object Storage (OOS) pour en créer une sauvegarde, ou pour permettre à d’autres comptes de le copier. Vous pouvez exporter les snapshots au format QCOW2 ou RAW.

Le snapshot peut ensuite être importé sur un compte en utilisant une URL pré-signée. Pour en savoir plus, voir Créer une URL pré-signée.

Avant d’exporter une OMI ou un snapshot vers une autre Région, assurez-vous que cette action est autorisée par toutes les licences tierces applicables. Si l’export est autorisé, seul l’export d’OMI garantit l’application des licences tierces dans la Région cible, alors que l’export de snapshot ne garantit pas leur application.

Exporter un snapshot sur un bucket avec Cockpit v2

  1. Cliquez dans le dashboard Snapshots pour faire apparaître des cases à cocher.

  2. Cochez la case du snapshot que vous voulez exporter sur un bucket OOS.
    Le snapshot est sélectionné et un menu d’actions apparaît.

  3. Cliquez sur IconExport Exporter un snapshot sur un bucket OOS.
    La boîte de dialogue EXPORTER UN SNAPSHOT SUR UN BUCKET OOS apparaît.

  4. Spécifiez les informations pour l’export :

    1. Dans la liste Format d’image disque, sélectionnez le format pour le disque d’export (QCOW2 ou RAW).

    2. Dans le champ Nom du bucket OOS, tapez le nom du bucket OOS.

      Vous devez avoir les permissions appropriées pour le bucket sur lequel vous voulez exporter le snapshot. Pour en savoir plus, voir Gérer les accès à vos buckets.

    3. (optionnel) Dans le champ Préfixe du bucket, tapez un préfixe pour la copie du snapshot dans le bucket OOS.
      Pour en savoir plus sur les préfixes, voir À propos d’OOS > Objets.

  5. Cliquez sur Exporter.
    Une copie du snapshot est exportée sur le bucket OOS.

Exporter un snapshot sur un bucket avec OSC CLI

À ce jour, cette section est disponible en anglais uniquement.

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"
  }
}

Pages connexes

Méthodes API correspondantes