Skip to content

Commit 1494357

Browse files
authored
docs(ins): update snapshot documentation (#5037)
* docs(ins): update snapshot documentation * feat(ins): update documentation * docs(ins): update content
1 parent 8dde0e1 commit 1494357

9 files changed

+171
-147
lines changed

pages/instances/api-cli/attaching-a-volume.mdx

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
meta:
3-
title: Attaching a Block Storage volume via the Instance API
3+
title: Attaching a Block Storage volume via the Block Storage API
44
description: This page explains how to attach a Block Storage volume using the Scaleway API.
55
content:
66
h1: Attaching a Block Storage volume via the Instance API
@@ -24,31 +24,37 @@ dates:
2424

2525
1. Query the current volumes of the Instance.
2626
```
27-
curl -q \
28-
-H "X-Auth-Token: $SECRET_KEY" \
29-
-H 'Content-Type: application/json' \
30-
https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/be3c50af-e8f3-4ff4-90fe-66972f06670d
27+
curl -X GET \
28+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
29+
"https://api.scaleway.com/instance/v1/zones/{zone}/servers/{server_id}"
30+
```
31+
32+
The output displays as follows:
33+
```
3134
{
32-
"server": {
33-
"allowed_actions": [
34-
...
35-
"volumes": {
36-
"0": {
37-
...
38-
"id": "7fe25caf-0a68-46a7-aeb9-63a278d33e2b",
39-
"volume_type": "l_ssd",
40-
...
41-
}
42-
},
43-
...
35+
"server": {
36+
"id": "de0f4d6a-3289-4716-97a8-d24b2a58dcd9",
37+
"name": "scw-priceless-diffie",
38+
"arch": "x86_64",
39+
...
40+
},
41+
"volumes": {
42+
"0": {
43+
"boot": false,
44+
"volume_type": "sbs_volume",
45+
"id": "1469d160-bfb2-4fdd-bb5d-f8d7c1d0439d",
46+
"zone": "pl-waw-2"
47+
}
48+
},
49+
...
4450
}
4551
```
4652

4753
As displayed, our current volumes are only constituted of the root volume.
4854
2. Hot-plug the volume created earlier:
4955
```bash
5056
curl -q \
51-
-H "X-Auth-Token: $SECRET_KEY" \
57+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
5258
-H 'Content-Type: application/json' \
5359
-X PATCH \
5460
-d '{
@@ -63,44 +69,34 @@ dates:
6369
}
6470
}
6571
}' \
66-
https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/be3c50af-e8f3-4ff4-90fe-66972f06670d
67-
{
68-
"server": {
69-
...
70-
"id": "be3c50af-e8f3-4ff4-90fe-66972f06670d",
71-
...
72-
"name": "scw-blissful-engelbart",
73-
"protected": false,
74-
"volumes": {
75-
"0": {
76-
"size": 20000000000,
77-
"state": "available",
78-
...
79-
"id": "7fe25caf-0a68-46a7-aeb9-63a278d33e2b",
80-
"volume_type": "l_ssd",
81-
"server": {
82-
"id": "be3c50af-e8f3-4ff4-90fe-66972f06670d",
83-
"name": "scw-blissful-engelbart"
84-
}
85-
},
86-
"1": {
87-
"size": 10000000000,
88-
"state": "available",
89-
"name": "block-volume101",
90-
"modification_date": "2019-09-03T10:17:40.800839+00:00",
91-
...
92-
"id": "b3a42fb1-e85c-46e9-b0a6-9adb62278295",
93-
"volume_type": "sbs_volume",
94-
"server": {
95-
"id": "be3c50af-e8f3-4ff4-90fe-66972f06670d",
96-
"name": "scw-blissful-engelbart"
97-
}
98-
}
99-
},
100-
...
101-
}
102-
}
72+
https://api.scaleway.com/instance/v1/zones/{zone}/servers/{server_id}
10373
```
74+
The output looks like the following example:
75+
```
76+
{
77+
"server": {
78+
"id": "1de0f4d6a-3289-4716-97a8-d24b2a58dcd9",
79+
"name": "scw-priceless-diffie",
80+
"arch": "x86_64",
81+
...
82+
},
83+
"volumes": {
84+
"0": {
85+
"boot": false,
86+
"volume_type": "sbs_volume",
87+
"id": "7fe25caf-0a68-46a7-aeb9-63a278d33e2b",
88+
"zone": "pl-waw-2"
89+
},
90+
"1": {
91+
"boot": false,
92+
"volume_type": "sbs_volume",
93+
"id": "b3a42fb1-e85c-46e9-b0a6-9adb62278295",
94+
"zone": "pl-waw-2"
95+
}
96+
},
97+
...
98+
}
99+
```
104100
3. Use [SSH](/instances/how-to/connect-to-instance/) to log into your server and verify that the new disk exists:
105101
```bash
106102
lsblk
@@ -125,7 +121,7 @@ dates:
125121

126122
```
127123
curl -q \
128-
-H "X-Auth-Token: $SECRET_KEY" \
124+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
129125
-H 'Content-Type: application/json' \
130126
https://api.scaleway.com/instance/v1/zones/fr-par-1/volumes/b3a42fb1-e85c-46e9-b0a6-9adb62278295
131127
{
@@ -135,7 +131,7 @@ dates:
135131
"name": "block-volume101",
136132
...
137133
"id": "b3a42fb1-e85c-46e9-b0a6-9adb62278295",
138-
"volume_type": "b_ssd",
134+
"volume_type": "sbs_volume",
139135
"server": {
140136
"id": "be3c50af-e8f3-4ff4-90fe-66972f06670d",
141137
"name": "scw-blissful-engelbart"

pages/instances/api-cli/creating-a-volume.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ content:
77
paragraph: This page explains how to create a Block Storage volume using the Scaleway API.
88
tags: block-storage block volume create storage
99
dates:
10-
validation: 2025-01-02
10+
validation: 2025-06-02
1111
posted: 2020-01-10
1212
categories:
1313
- block-storage
1414
- storage
1515
---
1616

17+
<Message type="important">
18+
Creating Block Storage volumes via the Instances API is deprected and the information below is proposed for informative purposes only. [Learn how to create a volume using the Block Storage API.](https://www.scaleway.com/en/developers/api/block/#path-volume-create-a-volume)
19+
</Message>
20+
1721
<Macro id="requirements" />
1822

1923
- A Scaleway account logged into the [console](https://console.scaleway.com)
@@ -24,7 +28,7 @@ categories:
2428
1. Create a block volume from the API by launching the following command:
2529
```
2630
curl -q \
27-
-H "X-Auth-Token: $SECRET_KEY" \
31+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
2832
-H 'Content-Type: application/json' \
2933
-X POST \
3034
-d '{"name": "block-volume-101", "organization": "'$SCW_ORGANIZATION'", "size": 10000000000, "volume_type": "b_ssd"}' \
@@ -33,7 +37,7 @@ categories:
3337
2. To retrieve the current status of the block volume, query the volume endpoint.
3438
```
3539
curl -q \
36-
-H "X-Auth-Token: $SECRET_KEY" \
40+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
3741
-H 'Content-Type: application/json' \
3842
https://api.scaleway.com/instance/v1/zones/fr-par-1/volumes/b3a42fb1-e85c-46e9-b0a6-9adb62278295
3943
{

pages/instances/api-cli/creating-backups.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ content:
77
paragraph: This page explains how to create backups of your Instaces using the Scaleway API
88
tags: instance create backup scaleway-api
99
dates:
10-
validation: 2025-01-02
10+
validation: 2025-05-28
1111
posted: 2021-05-26
1212
categories:
1313
- compute
@@ -38,12 +38,12 @@ The Backup feature is used to back up your Instance data. It creates an image of
3838
<Message type="tip">
3939
By default, the name of the image is built according to the name of the server and the date. You can specify a name for the image in the request:
4040
```sh
41-
scw instance server backp server-id zone=fr-par-1 name=myimagename
41+
scw instance server backup <server-id> zone=fr-par-1 name=<my-image-name>
4242
```
4343
</Message>
4444
A backup request will create an image object. You can view it using:
4545
```sh
46-
scw instance image get image-uid zone=fr-par-1
46+
scw instance image get <image-uid> zone=fr-par-1
4747
```
4848
An image contains one snapshot for each volume of the Instance. These snapshots are visible within the image response as `root_volume` and `extra_volumes` fields.
4949
</TabsTab>
@@ -78,22 +78,26 @@ The Backup feature is used to back up your Instance data. It creates an image of
7878
<TabsTab label="CLI">
7979
To delete a backup, run the following command:
8080
```sh
81-
scw instance image delete image-uid zone=fr-par1
81+
scw instance image delete <image-uid> zone=fr-par1
8282
```
8383
It is also recommended to remove every snapshot related to the image by running the following command for each snapshot that is no longer needed:
8484
```sh
85-
scw instance snapshot delete snapshot-uid zone=fr-par-1
85+
scw block snapshot delete <snapshot-uid> zone=fr-par-1
8686
```
8787
</TabsTab>
8888

8989
<TabsTab label="API">
9090
Run the following call to delete the image that contains a backup:
9191
```
92-
DELETE https://api.scaleway.com/instance/v1/zones/<region>/images/<image_uid>
92+
curl -X DELETE \
93+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
94+
"https://api.scaleway.com/instance/v1/zones/{zone}/images/{image_id}"
9395
```
9496
It is also recommended to remove every snapshot related to the image by running the following API call for each snapshot that is no longer needed:
9597
```
96-
DELETE https://api.scaleway.com/instance/v1/zones/<region>/snapshots/<snapshot_uid>
98+
curl -X DELETE \
99+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
100+
"https://api.scaleway.com/block/v1/zones/{zone}/snapshots/{snapshot_id}"
97101
```
98102
</TabsTab>
99103
</Tabs>

pages/instances/api-cli/detaching-a-volume.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 detach a Block Storage volume from an Instance using the Scaleway API.
88
tags: detach volume block storage unlink unplug api
99
dates:
10-
validation: 2025-01-02
10+
validation: 2025-06-02
1111
posted: 2020-01-10
1212
categories:
1313
- block-storage
@@ -23,15 +23,15 @@ To detach a block volume from a running Instance, relaunch the API call and omit
2323

2424
```
2525
curl -q \
26-
-H "X-Auth-Token: $SECRET_KEY" \
26+
-H "X-Auth-Token: $SCW_SECRET_KEY" \
2727
-H 'Content-Type: application/json' \
2828
-X PATCH \
2929
-d '{
3030
"volumes": {
3131
"0": "7fe25caf-0a68-46a7-aeb9-63a278d33e2b",
3232
}
3333
}' \
34-
https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/be3c50af-e8f3-4ff4-90fe-66972f06670d
34+
https://api.scaleway.com/instance/v1/zones/{zone}/servers/{server_id}
3535
```
3636

3737

pages/instances/api-cli/increasing-volume-size.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 increase a Block Storage volume
88
tags: increase expand increment raise storage volume block
99
dates:
10-
validation: 2025-03-11
10+
validation: 2025-06-02
1111
posted: 2020-01-10
1212
categories:
1313
- block-storage
@@ -30,7 +30,7 @@ The Instances API allows you to interact with Block Storage volumes programmatic
3030

3131
1. Inspect the volume and verify its name, size, and if the type is `b_ssd` by running the following request.
3232
```
33-
curl -q -H "X-Auth-Token: $SECRET_KEY" -X GET https://api.scaleway.com/instance/v1/zones/<REGION>/volumes/<VOLUME_ID>
33+
curl -q -H "X-Auth-Token: $SCW_SECRET_KEY" -X GET https://api.scaleway.com/instance/v1/zones/<REGION>/volumes/<VOLUME_ID>
3434
```
3535

3636
<Message type="note">
@@ -44,7 +44,7 @@ The Instances API allows you to interact with Block Storage volumes programmatic
4444
```
4545
2. To modify the volume size, run the request below:
4646
```
47-
curl https://api.scaleway.com/instance/v1/zones/REGION/volumes/VOLUME_ID -H "X-Auth-Token: $SECRET_KEY" -X PATCH -H 'Content-Type: application/json;charset=utf-8' --data '{ "name":"new_name", "size":26000000000 }'
47+
curl https://api.scaleway.com/instance/v1/zones/REGION/volumes/VOLUME_ID -H "X-Auth-Token: $SCW_SECRET_KEY" -X PATCH -H 'Content-Type: application/json;charset=utf-8' --data '{ "name":"new_name", "size":26000000000 }'
4848
```
4949
Replace `REGION` and `VOLUME_ID` following the guidelines mentioned previously and replace the existing size value with the new one.
5050

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

0 commit comments

Comments
 (0)