From 379516d769d564853eb3df87d39ee3dc8f5153fc Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Thu, 10 Oct 2024 11:20:44 +0200 Subject: [PATCH 1/4] feat(ins): add sbs migration with cli --- .../migrate-volumes-snapshots-to-sbs.mdx | 181 +++++++++++++----- 1 file changed, 133 insertions(+), 48 deletions(-) diff --git a/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx b/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx index 525383c912..1ca3d6870a 100644 --- a/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx +++ b/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx @@ -28,30 +28,69 @@ This guide provides the steps needed to migrate your volumes and snapshots smoot This process applies only to Block SSD (`b_ssd`) volumes. -1. Plan the migration by using the following `curl` command: - - ```bash - curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/plan" \ - --header "Content-Type: application/json" \ - --header "X-Auth-Token: $SCW_SECRET_KEY" \ - --data "{ - \"volume_id\": \"$SCW_VOLUME_ID\" - }" - ``` - - The response includes the volume and any snapshots created from the volume that will be migrated. It also returns a `validation_key`. - -2. Confirm the migration by using the following `curl` command: - - ```bash - curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/apply" \ - --header "Content-Type: application/json" \ - --header "X-Auth-Token: $SCW_SECRET_KEY" \ - --data "{ - \"volume_id\": \"$SCW_VOLUME_ID\", - \"validation_key\": \"$SCW_VALIDATION_KEY\" - }" - ``` + + + + The easiest way to migrate your Block Storage volumes is by using the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool. + + 1. Retrieve the ID of your Block Storage volume using the `scw instance volume list` command. This command returns a list of your volumes, as shown below: + ``` + $ scw instance volume list + ID STATE SERVER ID SERVER NAME + 369feb53-165f-437d-875e-188725df462b available + ``` + 2. Plan the volume migration with the `scw instance volume plan-migration ` command. This command provides the state of the volume and a unique `ValidationKey`, which is needed to start the migration. + ``` + $ scw instance volume plan-migration 369feb53-165f-437d-875e-188725df462b + Volume.ID 369feb53-165f-437d-875e-188725df462b + Volume.Name vol-peaceful-davinci + Volume.Size 25 GB + Volume.VolumeType b_ssd + Volume.CreationDate 3 minutes ago + Volume.ModificationDate 3 minutes ago + Volume.Organization 27e53d15-cc73-440e-956c-40560076e3d7 + Volume.Project 27e53d15-cc73-440e-956c-40560076e3d7 + Volume.Server.ID 177c6ed5-e999-4cc7-b152-8ce56217579c + Volume.Server.Name scw-naughty-robinson + Volume.State available + Volume.Zone fr-par-1 + ValidationKey 30d129ca895c4cd59f4c429e12dab300 + ``` + 3. Execute the migration using the `scw instance volume apply-migration validation-key= zone=` command. + ``` + $ scw instance volume apply-migration 369feb53-165f-437d-875e-188725df462b validation-key=30d129ca895c4cd59f4c429e12dab300 zone=fr-par-1 + ✅ Success + ``` + The volume migration is complete. You can now manage the migrated volume from the [Block Storage Volumes section](https://console.scaleway.com/block-storage/volumes) in the Scaleway console. + + + + 1. Plan the migration by using the following `curl` command: + + ```bash + curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/plan" \ + --header "Content-Type: application/json" \ + --header "X-Auth-Token: $SCW_SECRET_KEY" \ + --data "{ + \"volume_id\": \"$SCW_VOLUME_ID\" + }" + ``` + + The response includes the volume and any snapshots created from the volume that will be migrated. It also returns a `validation_key`. + + 2. Confirm the migration by using the following `curl` command: + + ```bash + curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/apply" \ + --header "Content-Type: application/json" \ + --header "X-Auth-Token: $SCW_SECRET_KEY" \ + --data "{ + \"volume_id\": \"$SCW_VOLUME_ID\", + \"validation_key\": \"$SCW_VALIDATION_KEY\" + }" + ``` + + ## Migrating an existing Block Storage snapshot to Scaleway Block Storage management @@ -59,30 +98,76 @@ This guide provides the steps needed to migrate your volumes and snapshots smoot This process applies to Block SSD (`b_ssd`) or Unified (`unified`) snapshots. -1. Plan the migration by using the following `curl` command: - - ```bash - curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/plan" \ - --header "Content-Type: application/json" \ - --header "X-Auth-Token: $SCW_SECRET_KEY" \ - --data "{ - \"snapshot_id\": \"$SCW_SNAPSHOT_ID\" - }" - ``` - - The response includes the source volume of the snapshot and any snapshots created from this volume, including the `snapshot_id` provided by the user. It also returns a `validation_key`. - -2. Confirm the migration using the following `curl` command: - - ```bash - curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/apply" \ - --header "Content-Type: application/json" \ - --header "X-Auth-Token: $SCW_SECRET_KEY" \ - --data "{ - \"snapshot_id\": \"$SCW_SNAPSHOT_ID\", - \"validation_key\": \"$SCW_VALIDATION_KEY\" - }" - ``` + + + + The easiest way to migrate your Block Storage snapshots is by using the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool. + + 1. Retrieve the ID of your snapshot using the `scw instance snapshot list` command. This command provides an output similar to the following: + ``` + $ scw instance snapshot list + ID NAME + a377afe5-a9a3-4706-b8c2-8d1c247a620f snap-eloquent-edison + ``` + 2. Plan the migration with the `scw instance snapshot plan-migration ` command. This command returns the state of the snapshot and a unique `ValidationKey`, which is necessary to start the migration. + ``` + $ scw instance snapshot plan-migration a377afe5-a9a3-4706-b8c2-8d1c247a620f + Snapshots.0.ID a377afe5-a9a3-4706-b8c2-8d1c247a620f + Snapshots.0.Name image-scw-quirky-torvalds_snap_0 + Snapshots.0.Organization 4a2e00bf-5126-43ce-9b09-be943c619139 + Snapshots.0.Project 4a2e00bf-5126-43ce-9b09-be943c619139 + Snapshots.0.VolumeType b_ssd + Snapshots.0.Size 10 GB + Snapshots.0.State available + Snapshots.0.CreationDate 2 weeks ago + Snapshots.0.ModificationDate 5 days ago + Snapshots.0.Zone fr-par-1 + Snapshots.1.ID 384799c2-c4dd-40ab-bd65-ed95cd7b4d5c + Snapshots.1.Name snap-eloquent-edison + Snapshots.1.Organization 4a2e00bf-5126-43ce-9b09-be943c619139 + Snapshots.1.Project 4a2e00bf-5126-43ce-9b09-be943c619139 + Snapshots.1.VolumeType b_ssd + Snapshots.1.Size 10 GB + Snapshots.1.State available + Snapshots.1.CreationDate 2 weeks ago + Snapshots.1.ModificationDate 5 days ago + Snapshots.1.Zone fr-par-1 + ValidationKey b36f7bcc21d344d783d4cbb27536bfad + ``` + 3. Execute the migration using the `scw instance snapshot apply-migration validation-key= zone=` command. + ``` + $ scw instance snapshot apply-migration a377afe5-a9a3-4706-b8c2-8d1c247a620f validation-key=b36f7bcc21d344d783d4cbb27536bfad zone=fr-par-1 + ✅ Success. + ``` + The snapshot migration is complete. You can now manage the migrated snapshot from the [Block Storage Snapshot section](https://console.scaleway.com/block-storage/volumes) in the Scaleway console. + + + 1. Plan the migration by using the following `curl` command: + + ```bash + curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/plan" \ + --header "Content-Type: application/json" \ + --header "X-Auth-Token: $SCW_SECRET_KEY" \ + --data "{ + \"snapshot_id\": \"$SCW_SNAPSHOT_ID\" + }" + ``` + + The response includes the source volume of the snapshot and any snapshots created from this volume, including the `snapshot_id` provided by the user. It also returns a `validation_key`. + + 2. Confirm the migration using the following `curl` command: + + ```bash + curl --location "https://api.scaleway.com/instance/v1/zones/$SCW_AVAILABILITY_ZONE/block-migration/apply" \ + --header "Content-Type: application/json" \ + --header "X-Auth-Token: $SCW_SECRET_KEY" \ + --data "{ + \"snapshot_id\": \"$SCW_SNAPSHOT_ID\", + \"validation_key\": \"$SCW_VALIDATION_KEY\" + }" + ``` + + ## Going further From 507b9bc7d7f14f52048eb87fe979448175f7d186 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Thu, 10 Oct 2024 11:53:30 +0200 Subject: [PATCH 2/4] Update migrate-volumes-snapshots-to-sbs.mdx --- .../instances/how-to/migrate-volumes-snapshots-to-sbs.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx b/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx index 1ca3d6870a..0d87e02763 100644 --- a/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx +++ b/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx @@ -7,15 +7,15 @@ content: paragraph: This guide provides step-by-step instructions to help you migrate your existing Block Storage volumes and snapshots to Scaleway's new Block Storage management system. tags: instance snapshot volume b_ssd sbs dates: - validation: 2024-08-07 + validation: 2024-10-10 posted: 2024-08-07 categories: - compute --- Scaleway is transitioning the management of Block Storage volumes and snapshots from compute teams to storage teams to enhance performance and reliability. -While the characteristics of your migrated volumes and snapshots will remain unchanged, they will now be managed by Scaleway's new storage management system. -This guide provides the steps needed to migrate your volumes and snapshots smoothly. +While the characteristics of your migrated volumes and snapshots will remain unchanged, Scaleway's new storage management system will now manage them. +This guide provides the steps needed to migrate your volumes and snapshots using either the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool (recommended) or via the [Instances API](https://www.scaleway.com/en/developers/api/instance/#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) (advanced). @@ -171,4 +171,4 @@ This guide provides the steps needed to migrate your volumes and snapshots smoot ## Going further -To learn more about managing your migrated Block Storage volumes from the Scaleway console, refer to the [Block Storage - Console documentation](/storage/block/quickstart/). Additionally, you can manage your Block Storage volumes using the [Scaleway Block Storage API](https://www.scaleway.com/en/developers/api/block/). \ No newline at end of file +To learn more about managing your migrated Block Storage volumes from the Scaleway console, refer to the [Block Storage - Console documentation](/storage/block/quickstart/). Additionally, you can manage your Block Storage volumes using the [Scaleway Block Storage API](https://www.scaleway.com/en/developers/api/block/). From 514477e402118dbb650b3f7d28ab868af503c1f8 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Thu, 10 Oct 2024 11:56:23 +0200 Subject: [PATCH 3/4] Apply suggestions from code review --- compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx b/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx index 0d87e02763..3801d18090 100644 --- a/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx +++ b/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx @@ -15,7 +15,7 @@ categories: Scaleway is transitioning the management of Block Storage volumes and snapshots from compute teams to storage teams to enhance performance and reliability. While the characteristics of your migrated volumes and snapshots will remain unchanged, Scaleway's new storage management system will now manage them. -This guide provides the steps needed to migrate your volumes and snapshots using either the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool (recommended) or via the [Instances API](https://www.scaleway.com/en/developers/api/instance/#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage) (advanced). +This guide provides the steps needed to migrate your volumes and snapshots using either the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool (recommended) or via the [Instances API](https://www.scaleway.com/en/developers/api/instance/#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage). From 76746ee4ea1a1428b952d2b1420259970d0683eb Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Thu, 10 Oct 2024 16:35:47 +0200 Subject: [PATCH 4/4] feat(ins): add note --- .../migrate-volumes-snapshots-to-sbs.mdx | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx b/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx index 3801d18090..e158b041a7 100644 --- a/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx +++ b/compute/instances/how-to/migrate-volumes-snapshots-to-sbs.mdx @@ -17,6 +17,10 @@ Scaleway is transitioning the management of Block Storage volumes and snapshots While the characteristics of your migrated volumes and snapshots will remain unchanged, Scaleway's new storage management system will now manage them. This guide provides the steps needed to migrate your volumes and snapshots using either the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool (recommended) or via the [Instances API](https://www.scaleway.com/en/developers/api/instance/#path-volumes-migrate-a-volume-andor-snapshots-to-sbs-scaleway-block-storage). + + The easiest way to migrate your Block Storage volumes and snapshots is by using the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool. + + - A Scaleway account logged into the [console](https://console.scaleway.com) @@ -30,8 +34,8 @@ This guide provides the steps needed to migrate your volumes and snapshots using - - The easiest way to migrate your Block Storage volumes is by using the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool. + + When you migrate a volume, the volume and any snapshots created from the volume will be migrated. 1. Retrieve the ID of your Block Storage volume using the `scw instance volume list` command. This command returns a list of your volumes, as shown below: ``` @@ -65,6 +69,10 @@ This guide provides the steps needed to migrate your volumes and snapshots using + + When you migrate a volume using the API, the volume and any snapshots created from the volume will be migrated. + + 1. Plan the migration by using the following `curl` command: ```bash @@ -100,8 +108,8 @@ This guide provides the steps needed to migrate your volumes and snapshots using - - The easiest way to migrate your Block Storage snapshots is by using the [Scaleway Command Line Interface (CLI)](/developer-tools/scaleway-cli/quickstart/) tool. + + When you migrate a snapshot, the source volume of the snapshot and any snapshots created from this volume will also be migrated. 1. Retrieve the ID of your snapshot using the `scw instance snapshot list` command. This command provides an output similar to the following: ``` @@ -142,6 +150,10 @@ This guide provides the steps needed to migrate your volumes and snapshots using The snapshot migration is complete. You can now manage the migrated snapshot from the [Block Storage Snapshot section](https://console.scaleway.com/block-storage/volumes) in the Scaleway console. + + When you migrate a snapshot using the API, the source volume of the snapshot and any snapshots created from this volume will also be migrated. + + 1. Plan the migration by using the following `curl` command: ```bash