Skip to content

Commit 95ee9ae

Browse files
committed
docs(ins): update snapshot documentation
1 parent 0214b6f commit 95ee9ae

File tree

4 files changed

+90
-74
lines changed

4 files changed

+90
-74
lines changed

pages/instances/api-cli/managing-instance-snapshot-via-cli.mdx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to manage Scaleway Instance snapshots with the CLI (v2)
88
tags: manage instance snapshot cli cli-v2
99
dates:
10-
validation: 2025-04-22
10+
validation: 2025-05-28
1111
posted: 2022-09-24
1212
categories:
1313
- compute
@@ -38,15 +38,11 @@ The following arguments and flags are available to customize your command:
3838

3939
```sh
4040
ARGS:
41+
[volume-id] UUID of the volume to snapshot
4142
[name=<generated>] Name of the snapshot
42-
[volume-id] UUID of the volume
43-
[tags.{index}] The tags of the snapshot
4443
[project-id] Project ID to use. If none is passed the default project ID will be used
45-
[bucket] Bucket name for snapshot imports
46-
[key] Object key for snapshot imports
47-
[size] Imported snapshot size, must be a multiple of 512
48-
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
49-
[zone=fr-par-1] Zone to target. If none is passed will use the default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | pl-waw-1)
44+
[tags.{index}] List of tags assigned to the snapshot
45+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
5046

5147
FLAGS:
5248
-h, --help help for create
@@ -82,11 +78,21 @@ Run the following command to create a named snapshot from the given volume ID. R
8278
scw block snapshot create name=foobar volume-id=11111111-1111-1111-1111-111111111111
8379
```
8480
81+
## Exporting a QCOW file to an Object Storage bucket from an Instance snapshot
82+
83+
Run the following command to export an Instance snapshot as a QCOW2 file to an existing Object Storage bucket in the same geographical region as the snapshot.
84+
85+
```
86+
scw block snapshot export-to-object-storage zone=fr-par-1 snapshot-id=11111111-1111-1111-1111-111111111111 bucket=<my-bucket> key=<my-qcow2-file-name.qcow2>
87+
```
88+
8589
## Importing a QCOW file from an Object Storage bucket as Instance snapshot
8690
87-
Run the following command to import a QCOW file as an Instance snapshot. Replace the bucket name `my-bucket` with the name of your Object Storage bucket and the file name `qcow2-file-name.qcow2` with the name of your QCOW file.
91+
Run the following command to import a QCOW file as an Instance snapshot. Replace the snapshot name `my-imported-snapshot` with the name of the snapshot to create, the bucket name `my-bucket` with the name of your Object Storage bucket and the file name `my-qcow2-file-name.qcow2` with the name of your QCOW file.
92+
Specify the size of the imoported snapshot with the `size=10GB` flag.
93+
8894
```
89-
scw block snapshot create zone=fr-par-1 name=my-imported-snapshot volume-type=b_ssd bucket=my-bucket key=my-qcow2-file-name.qcow
95+
scw block snapshot import-from-object-storage zone=fr-par-1 name=<my-imported-snapshot> bucket=<my-bucket> key=<my-qcow2-file-name.qcow2> size=10GB
9096
```
9197
9298
<Message type="important">

pages/instances/api-cli/snapshot-import-export-feature.mdx

Lines changed: 53 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to import/export Instance snapshots using the Scaleway API
88
tags: snapshot import export api instance
99
dates:
10-
validation: 2025-03-03
10+
validation: 2025-05-28
1111
posted: 2021-07-25
1212
categories:
1313
- compute
@@ -43,30 +43,39 @@ More information on the QCOW2 file format, and how to use it can be found in the
4343

4444
For example, using curl:
4545
```sh
46-
curl -X POST https://api.scaleway.com/instance/v1/zones/fr-par-1/snapshots/<snapshot_uuid>/export \
47-
-H "X-Auth-Token: <secret_key>" \
48-
-H "Content-Type: application/json" \
49-
--data '{"bucket": "my-bucket", "key": "my-exported-snapshot.qcow2"}'
50-
```
51-
The following information is required to run the command above:
52-
- The Availability Zone of the snapshot (here: `fr-par-1`)
46+
curl -X POST \
47+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
48+
-H "Content-Type: application/json" \
49+
-d '{"bucket":"<my-bucket-name>","key":"<my-snapshot.qcow2>"}' \
50+
"https://api.scaleway.com/block/v1/zones/<fr-par-1>/snapshots/<snapshot_id>/export-to-object-storage"
51+
```
52+
The following information is required to run the command above:
53+
- The Availability Zone of the snapshot (for example: `fr-par-1`)
5354
- The secret key of your API key pair (`<secret_key>`)
54-
- The snapshot ID (`<snapshot_uuid>`)
55+
- The snapshot ID (`<snapshot_id>`)
5556
- The name of the Object Storage bucket to store the snapshot (which has to exist in the same Scaleway region as the snapshot)
5657
- A key (can be any acceptable key/object name for Scaleway Object Storage (suffixing qcow2 images with `.qcow2`))
5758

5859
The API returns an output as in the following example:
5960
```json
6061
{
61-
"task": {
62-
"id": "<task_uuid>",
63-
"description": "export_snapshot",
64-
"status": "pending",
65-
"href_from": "/snapshots/<snapshot_uuid>/export",
66-
"href_result": "https://s3.fr-par.scw.cloud/my-bucket/my-exported-snapshot.qcow2",
67-
"started_at": "2022-07-25T15:23:49.278630+00:00",
68-
"terminated_at": null
69-
}
62+
"id": "939d0c67-2f82-4bd6-a9d0-94dd36c6d888",
63+
"name": "<my-snapshot-name>>",
64+
"parent_volume": {
65+
"id": "9e17baf7-1316-490b-964f-dd76ac7f5e93",
66+
"name": "<my-snapshot.qcow2>",
67+
"type": "sbs_5k",
68+
"status": "in_use"
69+
},
70+
"size": 10000000000,
71+
"project_id": "c1d1dab1-7e1a-4744-b0fd-d5a80ede56e4",
72+
"created_at": "2025-05-28T08:07:22.599534Z",
73+
"updated_at": "2025-05-28T08:07:22.599534Z",
74+
"references": [],
75+
"status": "exporting",
76+
"tags": [],
77+
"class": "sbs",
78+
"zone": "fr-par-1"
7079
}
7180
```
7281

@@ -83,62 +92,50 @@ Call the `import` snapshot API endpoint to initiate the snapshot import.
8392
For example, using curl:
8493

8594
```sh
86-
curl -X POST https://api.scaleway.com/instance/v1/zones/fr-par-2/snapshots/ \
87-
-H "X-Auth-Token: <secret_key>" -H "Content-Type: application/json" \
88-
--data '{"bucket": "my-bucket", "key": "my-exported-snapshot.qcow2", "volume_type": "b_ssd", "project": "<scaleway_project_id>", "name": "my-imported-snapshot"}'
95+
curl -X POST \
96+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
97+
-H "Content-Type: application/json" \
98+
-d '{
99+
"bucket": "<my-bucket-name>",
100+
"key": "<my-snapshot.qcow2>",
101+
"name": "<my-imported-snapshot>",
102+
"project_id": "<my-project-id>",
103+
"size": "<snapshot-size-in-bytes>"
104+
}' \
105+
"https://api.scaleway.com/block/v1/zones/fr-par-1/snapshots/import-from-object-storage"
89106
```
90107

91108
The following information is required to run the command above:
92-
- The Availability Zone of the snapshot (here: `fr-par-2`)
93-
- The secret key of your API key pair (`<secret_key>`)
109+
- The Availability Zone of the snapshot (here: `fr-par-1`)
94110
- The name of the Object Storage bucket holding the snapshot (which has to exist in the same Scaleway region as the snapshot)
95111
- The object name of the QCOW2 image
96-
97-
- The snapshot's volume type (It can be `l_ssd` or `b_ssd`.)
98-
- A Scaleway Project UUID
99112
- The name of the newly created snapshot (used to identify the snapshot in the Console)
100-
- **Optional**: A size parameter. If missing, the size of the created snapshot is defaulted to the QCOW2's volume size.
113+
- A Scaleway Project UUID
114+
- **Optional**: A size parameter in bytes. If missing, the size of the created snapshot is defaulted to the QCOW2's volume size.
101115

102116
The API returns an output as in the following example:
103117

104118
```json
105119
{
106-
"snapshot": {
107-
"id": "<snapshot_uuid>",
108-
"name": "my-imported-snapshot",
109-
"volume_type": "b_ssd",
110-
"creation_date": "2022-07-25T15:27:48.654782+00:00",
111-
"modification_date": "2022-07-25T15:27:48.654782+00:00",
112-
"organization": "<scaleway_organization_id>",
113-
"project": "<scaleway_project_id>",
120+
"id": "033d6442-784b-4301-bfaa-0892973c296f",
121+
"name": "<my-imported-snapshot>",
122+
"parent_volume": null,
114123
"size": 10737418240,
115-
"state": "importing",
116-
"base_volume": null,
124+
"project_id": "844e1e32-6280-42e2-aa96-45d3af1a1aea",
125+
"created_at": "2025-05-28T08:35:53.199253Z",
126+
"updated_at": "2025-05-28T08:35:53.199253Z",
127+
"references": [],
128+
"status": "creating",
117129
"tags": [],
118-
"zone": "fr-par-2",
119-
"error_details": null
120-
},
121-
"task": {
122-
"id": "<task_uuid>",
123-
"description": "import_snapshot",
124-
"status": "pending",
125-
"href_from": "/snapshots/",
126-
"href_result": "snapshots/<snapshot_uuid>",
127-
"started_at": "2022-07-25T15:27:48.797883+00:00",
128-
"terminated_at": null
129-
}
130+
"class": "sbs",
131+
"zone": "fr-par-1"
130132
}
131133
```
132134

133-
Once the snapshot has been imported, it becomes available in the list of snapshots in the `fr-par-2` AZ:
135+
Once the snapshot has been imported, it becomes available in the list of snapshots in the `fr-par-1` AZ.
134136

135137
<Message type="tip">
136-
The Instance snapshot will be created as soon as the API call returns, but the import action will take several minutes to complete. In the meantime, the snapshot will be in the `importing` state, before becoming `available` once the import is successful.
137-
138-
```sh
139-
curl -X GET https://api.scaleway.com/instance/v1/zones/fr-par-2/snapshots/<snapshot_uuid> \
140-
-H "X-Auth-Token: <secret_key>" | jq ".snapshot.state" "importing"
141-
```
138+
The Instance snapshot will be created as soon as the API call returns, but the import action will take several minutes to complete. In the meantime, the snapshot will be in the `creating` state, before becoming `available` once the import is successful.
142139
</Message>
143140

144141

pages/instances/how-to/create-image-from-snapshot.mdx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ categories:
2222

2323
## Creating an image from a snapshot via the Scaleway console
2424

25-
1. Click **CPU Instances** in the **Compute** section of the side menu. The [Instances page](https://console.scaleway.com/instance/servers) displays.
25+
1. Click **CPU & GPU Instances** in the **Compute** section of the side menu. The [Instances page](https://console.scaleway.com/instance/servers) displays.
2626
2. Click the **Images** tab. A list of your images displays.
2727
3. Click **+ Create image**. The image creation page displays.
2828
4. Choose the **Availability Zone** in which you want your image to be created.
@@ -50,10 +50,23 @@ scw instance image create snapshot-id="$SCW_VOLUME_ID_1" additional-volumes.0.id
5050
- Ensure the architecture (`arch`) is set to a valid value (e.g., `x86_64`).
5151

5252
<Message type="note">
53-
Supported volume IDs include:
54-
- Local Storage volumes (`l_ssd`)
55-
- Block Storage Low Latency volumes (`sbs`)
56-
- Block Storage legacy (`b_ssd`) volumes (deprecated).
53+
Supported arguments for the image create commmand include:
54+
```
55+
ARGS:
56+
[name=<generated>] Name of the image
57+
snapshot-id UUID of the snapshot that will be used as root volume in the image
58+
arch Architecture of the image (unknown_arch | x86_64 | arm | arm64)
59+
[additional-volumes.{index}.id] UUID of the snapshot to add
60+
[additional-volumes.{index}.name] Name of the additional snapshot
61+
[additional-volumes.{index}.size] Size of the additional snapshot
62+
[additional-volumes.{index}.volume-type] Underlying volume type of the additional snapshot (l_ssd | b_ssd | unified | scratch | sbs_volume | sbs_snapshot)
63+
[additional-volumes.{index}.project-id] Project ID that own the additional snapshot
64+
[project-id] Project ID to use. If none is passed the default project ID will be used
65+
[tags.{index}] Tags of the image
66+
[public] True to create a public image
67+
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
68+
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | fr-par-3 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2 | pl-waw-3)
69+
```
5770
</Message>
5871

5972
## Creating an image via the Scaleway API

pages/instances/how-to/snapshot-import-export-feature.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to import/export snapshots of Instances using the Scaleway console.
88
tags: snapshot, import, export, instance, availability zone, qcow2
99
dates:
10-
validation: 2025-03-25
10+
validation: 2025-05-28
1111
posted: 2021-07-27
1212
categories:
1313
- compute
@@ -33,7 +33,7 @@ More information on the QCOW2 file format and how to use it can be found in the
3333
For this guide, we assume you have an Instance running in the `fr-par-1` AZ, your Object Storage bucket is located in the region `fr-par`, and you want to create a new Instance in the `fr-par-2` AZ.
3434
</Message>
3535

36-
1. Click the [Instances section](https://console.scaleway.com/instance/servers) of the Scaleway console, then click the Instance you want to snapshot.
36+
1. Click the [CPU & GPU Instances section](https://console.scaleway.com/instance/servers) of the Scaleway console, then click the Instance you want to snapshot.
3737
2. The Instance overview displays. Click the **Storage** tab to display the storage resources attached to the Instance. Scroll to the **Snapshots** section of the page.
3838
3. Click the name of the snapshot you want to export. The snapshot overview displays.
3939
4. Click **Actions** then select **Copy to bucket**. A pop-up displays. Enter the file name for your exported snapshot copy and select the destination bucket. Then click **Copy snapshot to bucket**.
@@ -45,7 +45,7 @@ For this guide, we assume you have an Instance running in the `fr-par-1` AZ, you
4545
Depending on the size of your snapshot, the export to Object Storage may take some time. It is ready once the status indicator changes to green.
4646
</Message>
4747
2. Click <Icon name="more" /> next to the snapshot copy, then click **Import as snapshot**. A pop-up will appear. Enter the name of the snapshot, select the destination AZ, and choose the snapshot type.
48-
The type can be either **Local SSD** or **Block SSD**. Click **Import file as snapshot** to import the snapshot into the destination AZ.
48+
The type can be either **Local Storage** or **Block Storage**. Click **Import object as snapshot** to import the snapshot into the destination AZ.
4949
<Message type="important">
5050
- Ensure that the QCOW / QCOW2 image file you want to import uses the file extension `.qcow` or `.qcow2` to avoid issues during import.
5151
- Imported snapshots must have a volume size between 1 GB and 1 TB.

0 commit comments

Comments
 (0)