Importer un snapshot depuis un bucket

Vous pouvez importer un snapshot dans votre compte depuis un bucket compatible S3.

Cette action vous permet, par exemple, de récupérer une sauvegarde d’un snapshot ou de le copier entre des comptes de Régions différentes. La copie du snapshot vous appartient, est indépendante du snapshot source et a son propre ID. Vous pouvez créer des volumes ou des OUTSCALE Machine Images (OMI) à partir de cette copie, la partager avec d’autres comptes ou la supprimer.

Pour importer un snapshot, vous devez spécifier son URL pré-signée. Pour en savoir plus, voir Configurer une URL pré-signée.

Importer un snapshot depuis un Bucket avec Cockpit v2

Avant de commencer : Obtenez l’URL pré-signée du snapshot. Pour ce faire, vous devez avoir accès au bucket dans lequel le snapshot est stocké. Pour en savoir plus, voir Configurer l’ACL d’un objet et Configurer une URL pré-signée.

  1. Dans le dashboard Snapshots, cliquez sur IconImport Importer un snapshot.
    La boîte de dialogue IMPORTER UN SNAPSHOT apparaît.

  2. Dans le champ Nom, tapez un nom pour le snapshot.

  3. (optionnel) Dans le champ Description, tapez une description pour le snapshot.

  4. Dans le champ URL d’objet pré-signée, tapez l’URL pré-signée du snapshot dans le bucket.

  5. Dans le champ Taille du snapshot, tapez la taille de la copie du snapshot en octets.

    Cette taille doit être supérieure ou égale à celle du snapshot d’origine, non compressé.

  6. Cliquez sur Importer.
    Une copie du snapshot est importée dans votre compte.

Importer un snapshot depuis un Bucket avec OSC CLI

Avant de commencer : Obtenez l’URL pré-signée du snapshot. Pour ce faire, vous devez avoir accès au bucket dans lequel le snapshot est stocké. Pour en savoir plus, voir Configurer l’ACL d’un objet et Configurer une URL pré-signée.

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

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

Pages connexes

Méthodes API correspondantes