Skip to content

Commit 2c8a53d

Browse files
committed
docs(ins): content added
1 parent a774e4f commit 2c8a53d

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

menu/navigation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,10 @@
15981598
"label": "Understanding the differences between ARM and x86 Instances",
15991599
"slug": "understanding-differences-x86-arm"
16001600
},
1601+
{
1602+
"label": "Moving Instances between Availability Zones and Projects",
1603+
"slug": "moving-instances-between-az-and-projects"
1604+
},
16011605
{
16021606
"label": "Understanding QEMU Guest Agent",
16031607
"slug": "understanding-qemu-guest-agent"

pages/instances/reference-content/moving-instances-between-az-and-projects.mdx

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,64 @@ Snapshots must be exported to a Scaleway Object Storage bucket in the same regio
6262
Replace `<snapshot-id>` with the snapshot ID, `<bucket-name>` with your Object Storage bucket name, and `<qcow2-file-name>` with the desired file name.
6363

6464

65-
- For legacy volumes, managed by the Instances API, usee the following command:
65+
- For legacy Block Storage volumes or Local Storage volumes, managed by the Instances API, usee the following command:
6666
```bash
6767
scw instance snapshot export-to-object-storage zone=<zone-to-target> snapshot-id=<snapshot-id> bucket=<bucket-name> key=<qcow2-file-name>.qcow2
6868
```
6969
Replace `<snapshot-id>` with the snapshot ID, `<bucket-name>` with your Object Storage bucket name, and `<qcow2-file-name>` with the desired file name.
7070

7171

7272
### Importing the Snapshot into the destination AZ
73+
74+
Import your QCOW2 object as a Local Storage or Block Storage snapshot. You can then deploy an Instance from it.
75+
76+
#### Importing snapshots via the console
77+
78+
1. Navigate to **Object Storage** and select the Region you have exported your snaphot to.
79+
2. Click the name of the bucket containing your snapshot to display it's content.
80+
3. Click <Icon name="more" /> next to the name of snapshot to view the object menu.
81+
4. Click **Import as snapshot**. A pop-up displays.
82+
5. Enter a name for the snapshot or keep the suggested name, choose the destination AZ for the snapshot to be imported into and select the snapshot type.
83+
- Imported snapshots can be either Local Storage or Block Storage.
84+
6. Click **Import object as snapshot**.
85+
86+
#### Importing snapshots via CLI
87+
88+
Import snapshots via the CLI using the following command:
89+
90+
```bash
91+
scw block snapshot import-from-object-storage name=<snapshot-name> bucket=<bucket-name> key=<qcow2-file-name>.qcow2 size=<size-in-GB> project-id=<project-id-to-target> zone=<zone-to-target>
92+
```
93+
Replace `<snapshot-name>` with the name for the snapshot to import, `<bucket-name>` with your Object Storage bucket name, and `<qcow2-file-name>` with the desired file name.
94+
Replace `<size-in-GB>` with the desired size for the new snapshot, `<project-id>` with the Project ID to import the snapshot to (optional), `<zone-to-target>` with the AZ to import the snapshot into.
95+
96+
### Creating a new Instance in the destination AZ
97+
98+
#### Creating a new Instance via the console
99+
- Navigate to **Compute > CPU & GPU Instances** and click **+ Create Instance > Create CPU Instance**.
100+
- Select the destination AZ and desired Instance type.
101+
- At the **Choose an image** step, go to the **My snapshots** tab and select the imported snapshot.
102+
- Configure additional volumes, network settings, and flexible IPs as needed. To retain the original public IP, select it under **Select existing IPv4(s)**.
103+
- Click **Create Instance**.
104+
105+
#### Creating a new Instance via CLI
106+
107+
Run the following command to create a new Instance with a Block Storage root volume from an imported snapshot:
108+
109+
```sh
110+
scw instance server create image=none root-volume=block:<snapshot-id> type=<commercial-type> zone=<zone-to-target> project-id=<project-to-target>
111+
```
112+
113+
Replace `<snapshot-id>` with the ID of the imported snapshot, `<commercial-type>` with the commercial type of the Instance to create, `<zone-to-target>` with the AZ to create the Instance in, and `<project-to-target>` with the ID of the project to target.
114+
115+
## Considerations for storage types
116+
- **Local Storage (LSSD)**:
117+
- Snapshots are created and managed via the Instance API.
118+
- Local Storage is tied to the Instance’s hypervisor and cannot be detached independently. Use snapshots to move data to a new Instance.
119+
- **Block Storage (BSSD/SBS)**:
120+
- Block Storage volumes can be detached and reattached to another Instance in the same AZ without snapshotting, if moving within the same Project and AZ:
121+
```bash
122+
scw instance server detach-volume volume-id=<volume-id> zone=<zone-to-target>
123+
scw instance server attach-volume server-id=<server-id> volume-id=<volume-id> zone=<zone-to-target>
124+
```
125+
- LSSD snapshots can only be restored to Local Storage volumes, and BSSD snapshots to Block Storage volumes. Ensure the correct snapshot type is selected during import.

0 commit comments

Comments
 (0)