---
title: "Migrate a cloud server from Servers.ru"
sidebar_label: "Migrate a server from Servers.ru"
sidebar_position: 8
description: "How to migrate a cloud server from Servers.ru to Selectel"
---

import Formbricks from '@theme/MDXComponents/Formbricks'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import {TabItemLabel} from '@selectel/docux/components'
import CopyIcon from '@selectel/docux/icons/copy'

# Migrate a cloud server from Servers.ru

Before migrating, see how cloud servers work in the [Cloud Servers product description](/cloud-servers/about/about-cloud-server.mdx).

1. [Install the cloud-init agent on a Servers.ru cloud server](#install-cloud-init-on-servers-ru-server).
2. [Get a snapshot of a Servers.ru cloud server](#get-servers-ru-snapshot).
3. [Upload the Servers.ru server snapshot as an image to Selectel](#upload-servers-ru-snapshot-as-selectel-image).
4. [Check the snapshot image integrity](#check-snapshot-sum).
5. [Create a new server from the uploaded snapshot](#create-server-from-servers-ru-snapshot).
6. Optional: [change DNS server addresses](#change-dns-addresses).
7. Optional: [configure network volume backups](#configure-backup-plans).
8. Optional: [configure a global router](#configure-global-router) to connect your cloud server to other products and services.

## 1. Install the cloud-init agent on a Servers.ru cloud server \{#install-cloud-init-on-servers-ru-server}

<Tabs queryString="install-cloud-init">
  <TabItem value="ubuntu-debian" default>
    <TabItemLabel>
      Ubuntu/Debian
    </TabItemLabel>

    1. Connect to the Servers.ru cloud server.

    2. Check the agent status:

       ```bash
       cloud-init status
       ```

    3. If cloud-init is not installed on the server, install it:

       ```bash
       sudo apt update  
       sudo apt install cloud-init
       ```
  </TabItem>

  <TabItem value="centos">
    <TabItemLabel>
      CentOS
    </TabItemLabel>

    1. Connect to the Servers.ru cloud server.

    2. Check the agent status:

       ```bash
       cloud-init status
       ```

    3. If cloud-init is not installed on the server, install it:

       ```bash
       sudo yum update  
       sudo yum install cloud-init
       ```
  </TabItem>

  <TabItem value="windows">
    <TabItemLabel>
      Windows
    </TabItemLabel>

    1. Connect to the Servers.ru cloud server.

    2. Check the agent status:

       ```bash
       Get-Service -Name "Cloudbase-Init"
       ```

    3. If cloud-init is not installed on the server, install `cloudbase-init`; more details can be found on the official [cloudbase-init website](https://cloudbase.it/cloudbase-init/).
  </TabItem>
</Tabs>

## 2. Get a snapshot of a Servers.ru cloud server \{#get-servers-ru-snapshot}

To get a snapshot from the [Servers.ru control panel](http://Servers.ru):

* [create and download the server snapshot](#create-and-download-snapshot);
* if you cannot download the snapshot, [transfer the snapshot via a temporary server](#transfer-snapshot-via-proxy).

### Create and download a snapshot from the Servers.ru control panel \{#create-and-download-snapshot}

<Tabs queryString="create-download-snapshot">
  <TabItem value="panel">
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. Log in to the [Servers.ru control panel](https://portal.servers.ru/)..

    2. Go to **Cloud Servers** → **Create and manage**.

    3. Open the page of the required server.

    4. Shut down the server to reduce the risk of data loss when creating a snapshot.

    5. Open the **Snapshots** tab.

    6. Click **Take snapshot**.

    7. Enter a snapshot name.

    8. Click **Take shot**.

    9. Wait for the snapshot to be created.

    10. Click **Download**.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open OpenStack CLI](https://www.servers.ru/knowledge/cloud-servers/where-can-i-find-openstack-api-credentials) authorized in Servers.ru.

    2. Find the server ID. To do this, list the servers:

       ```bash
       openstack server list
       ```

       Copy the server ID.

    3. Create a server snapshot:

       ```bash
       openstack server image create --name <image_name> <server_id>
       ```

       Specify:

       * `<image_name>` — snapshot name;
       * `<server_id>` — ID of the server that you copied in step 2.

    4. Get the snapshot checksum value. It is needed for [checking the snapshot integrity](#check-snapshot-sum).

       4.1. List the snapshots:

       ```bash
       openstack image list --private
       ```

       Copy the snapshot ID from the response.

       4.2. Get the checksum value. To do this, display the snapshot properties:

       ```bash
       openstack image show <image_id>
       ```

       Specify `<image_id>` — snapshot ID.

       Save the checksum value; it is specified in the `checksum` field.

    5. Download the snapshot:

       ```bash
       openstack image save --file <file_name> <image_id>
       ```

       Specify:

       * `<file_name>` — name of the downloaded file;
       * `<image_id>` — snapshot ID that you copied in step 4.1.
  </TabItem>
</Tabs>

### Transfer snapshot via a temporary server \{#transfer-snapshot-via-proxy}

If you cannot download the snapshot from the Servers.ru control panel, you can upload it as a file via a temporary Selectel server.

1. Log in to the [Selectel control panel](https://my.selectel.ru/)..

2. [Create a temporary cloud server](/cloud-servers/create/create-server.mdx) in the [Selectel control panel](https://my.selectel.ru/vpc/default/servers/) with a disk larger than the snapshot size.

3. [Connect to the temporary server](/cloud-servers/manage/connect-to-server.mdx).

4. Download the snapshot from Servers.ru to the temporary server:

   ```bash
   curl -o <path_to_file> "<snapshot_url>"
   ```

   Specify:

   * `<path_to_file>` — the path to the file including the filename where the snapshot will be saved. We recommend creating a separate directory to save the snapshot to;
   * `<snapshot_url>` — link to the snapshot from the Servers.ru control panel.

5. Go to the directory where you downloaded the snapshot in step 4.

6. Start the web server:

   ```bash
   python3 -m http.server 80
   ```

   If Python is not installed on the server OS, install it and restart the web server. For more information on installing Python, see the [Downloading Python](https://wiki.python.org/moin/BeginnersGuide/Download) section of the official Python documentation.

7. Open the `http://<ip_address>:80` page in your browser.

   Enter `<ip_address>` — the public IP address of the cloud server. You can copy it in the [control panel](https://my.selectel.ru/): from the top menu, click **Products** → **Cloud Servers** → server page → **Ports** tab → in the port card, click <CopyIcon /> next to the public IP address.

8. On the page, click the snapshot.

9. Copy and save the snapshot link from the address bar.

## 3. Upload the Servers.ru server snapshot as an image to Selectel \{#upload-servers-ru-snapshot-as-selectel-image}

If the size of the Servers.ru server snapshot exceeds 5 GB, we recommend adding it to the pool via S3. For more details, see the [Upload image via S3](/cloud-servers/images/create-image.mdx#upload-image-via-object-storage) section of the [Upload and create image](/cloud-servers/images/create-image.mdx) instruction.

<Tabs queryString="upload-servers-ru-snapshot">
  <TabItem value="panel">
    <TabItemLabel>
      Control panel
    </TabItemLabel>

    1. Log in to the [control panel](https://my.selectel.ru/) Selectel.

    2. In the top menu, click **Products** and select **Cloud Servers**.

    3. Go to the **Images** section.

    4. Click **Create image**.

    5. Enter an image name.

    6. Select the [region and pool segment](/infrastructure/locations.mdx) where the server will be created.

    7. Select the Linux operating system, even if the snapshot is of a Windows server. This is necessary to ensure that servers created from this snapshot boot correctly.

    8. Upload the image:
       * if you [downloaded the snapshot in step 2](#create-and-download-snapshot), select the snapshot file as the image source;
       * if you [transferred the snapshot via a temporary server in step 2](#transfer-snapshot-via-proxy), enter the link to the snapshot file that you saved in step 9.

    9. Click **Upload**.

    10. Select the image format **qcow2** and the container format **bare**. If you do not know which formats to specify, use the image format **raw** and the container format **bare**.

    11. Optional: select the **Specify minimum disk and memory size** checkbox and specify the RAM size in MB and disk size in GB. This is the minimum disk and RAM size required to create a server from this image.

    12. You cannot change the minimum disk and memory requirements in the control panel once the image is created.

    13. Check the image price.

    14. Click **Create**.
  </TabItem>

  <TabItem value="openstack">
    <TabItemLabel>
      OpenStack CLI
    </TabItemLabel>

    1. [Open the OpenStack CLI](/cloud-servers/tools/openstack-cli/) and authorize in Selectel.

    2. Upload the Servers.ru server snapshot as an image to Selectel:

       ```bash
       openstack image create --disk-format qcow2 /
          --container-format bare /
          --property hw_disk_bus=scsi /
          --property hw_qemu_guest_agent=yes /
          --property hw_scsi_model=virtio-scsi /
          --property x_sel_image_agent_type=cloud-init /
          --property hw_hardware_type=bios /
          --file <file_name> /
          <image_name>
       ```

       Specify:

       * `<file_name>` — the name of the snapshot file that you [obtained in step 2](#get-servers-ru-snapshot);
       * `<image_name>` — the name of the image in Selectel.
  </TabItem>
</Tabs>

## 4. Check the snapshot integrity \{#check-snapshot-sum}

To ensure that the snapshot from the Servers.ru server has loaded correctly, calculate the file's checksum. A file checksum is a string of characters that confirms the integrity of the downloaded file.

The calculation method depends on the method you used to [obtain the snapshot in step 2](#get-servers-ru-snapshot).

<Tabs queryString="check-snapshot-sum">
  <TabItem value="locally">
    <TabItemLabel>
      Locally
    </TabItemLabel>

    <Tabs queryString="os">
      <TabItem value="linux">
        <TabItemLabel>
          Linux
        </TabItemLabel>

        1. If you [downloaded the snapshot](#create-and-download-snapshot) via the Servers.ru control panel, calculate the snapshot's checksum. If you downloaded the snapshot via the OpenStack CLI, skip this step.

           1.1. Open the CLI.

           1.2. Calculate the checksum of the snapshot file:

           ```bash
           md5sum <file_path>
           ```

           Enter `<file_path>` — the path to the snapshot file.

           1.3. Save the snapshot checksum.

        2. In the Selectel [control panel](https://my.selectel.ru/), from the top menu, click **Products** and select **Cloud Servers**.

        3. Go to the **Images** section.

        4. In the image card, find the MD5 value. The value must match the snapshot checksum that you saved in step 1.3.

           If you [downloaded the snapshot in step 2](#create-and-download-snapshot) via OpenStack CLI, the checksum must match the value that you saved in step 4.2.
      </TabItem>

      <TabItem value="macos">
        <TabItemLabel>
          macOS
        </TabItemLabel>

        1. If you [downloaded the snapshot](#create-and-download-snapshot) via the Servers.ru control panel, calculate the snapshot's checksum. If you downloaded the snapshot via the OpenStack CLI, skip this step.

           1.1. Open the CLI.

           1.2. Calculate the checksum of the snapshot file:

           ```bash
           md5 <file_path>
           ```

           Enter `<file_path>` — the path to the snapshot file.

           1.3. Save the snapshot checksum.

        2. In the Selectel [control panel](https://my.selectel.ru/), from the top menu, click **Products** and select **Cloud Servers**.

        3. Go to the **Images** section.

        4. In the image card, find the MD5 value. The value must match the snapshot checksum that you saved in step 1.3.

           If you [downloaded the snapshot in step 2](#create-and-download-snapshot) via OpenStack CLI, the checksum must match the value that you saved in step 4.2.
      </TabItem>

      <TabItem value="windows">
        <TabItemLabel>
          Windows
        </TabItemLabel>

        1. If you [downloaded the snapshot](#create-and-download-snapshot) via the Servers.ru control panel, calculate the snapshot's checksum. If you downloaded the snapshot via the OpenStack CLI, skip this step.

           1.1. Open the CLI.

           1.2. Calculate the snapshot file checksum:

           ```bash
           certutil -hashfile <file_path> MD5
           ```

           Enter `<file_path>` — the path to the snapshot file.

           1.3. Save the snapshot checksum.

        2. In the Selectel [control panel](https://my.selectel.ru/), from the top menu, click **Products** and select **Cloud Servers**.

        3. Go to the **Images** section.

        4. In the image card, find the MD5 value. The value must match the snapshot checksum that you saved in step 1.3.

           If you [downloaded the snapshot in step 2](#create-and-download-snapshot) via OpenStack CLI, the checksum must match the value that you saved in step 4.2.
      </TabItem>
    </Tabs>
  </TabItem>

  <TabItem value="proxy-server">
    <TabItemLabel>
      On a temporary server
    </TabItemLabel>

    <Tabs queryString="proxy-os">
      <TabItem value="proxy-linux">
        <TabItemLabel>
          Linux
        </TabItemLabel>

        1. Calculate the snapshot checksum.

           1.1. [Connect to the temporary server](/cloud-servers/manage/connect-to-server.mdx).

           1.2. Calculate the snapshot file checksum:

           ```bash
           md5sum <file_path>
           ```

           Enter `<file_path>` — the path to the snapshot file.

           1.3. Save the snapshot checksum.

        2. In the Selectel [control panel](https://my.selectel.ru/), from the top menu, click **Products** and select **Cloud Servers**.

        3. Go to the **Images** section.

        4. In the image card, check the MD5 value. The value must match the snapshot checksum that you saved in step 1.3.
      </TabItem>

      <TabItem value="proxy-windows">
        <TabItemLabel>
          Windows
        </TabItemLabel>

        1. Calculate the snapshot checksum.

           1.1. [Connect to the temporary server](/cloud-servers/manage/connect-to-server.mdx).

           1.2. Calculate the snapshot file checksum:

           ```bash
           certutil -hashfile <file_path> MD5
           ```

           Enter `<file_path>` — the path to the snapshot file.

           1.3. Save the snapshot checksum.

        2. In the Selectel [control panel](https://my.selectel.ru/), from the top menu, click **Products** and select **Cloud Servers**.

        3. Go to the **Images** section.

        4. In the image card, check the MD5 value. The value must match the snapshot checksum that you saved in step 1.3.
      </TabItem>
    </Tabs>
  </TabItem>
</Tabs>

## 5. Create a server from the added snapshot \{#create-server-from-servers-ru-snapshot}

1. Use the [Create a cloud server](/cloud-servers/create/create-server.mdx) instruction. Select the source — the Servers.ru server snapshot image that you [uploaded in step 3](#upload-servers-ru-snapshot-as-selectel-image);
2. Optional: [delete the snapshot image](/cloud-servers/images/delete-image.mdx) after creating the cloud server to avoid being charged for its storage.
3. Optional: [delete the temporary server](/cloud-servers/manage/delete-server.mdx) used to [transfer the snapshot](#transfer-snapshot-via-proxy) to avoid being charged for its use.

## 6. Optional: change DNS server addresses \{#change-dns-addresses}

Use the [Change DNS servers in a private subnet](/cloud-servers/cloud-networks/private-networks-and-subnets.mdx#change-dns-servers-on-private-subnet) and [Change DNS servers in a public subnet](/cloud-servers/cloud-networks/public-subnets.mdx#change-dns-servers-on-public-subnet) instructions. Enter the Selectel DNS server addresses: `188.93.16.19` and `188.93.17.19`.

## 7. Optional: configure network volume backups \{#configure-backup-plans}

Use the [Configure scheduled backups](/cloud-servers/backups/create-backup.mdx#configure-scheduled-backups) subsection of the [Create backups](/cloud-servers/backups/create-backup.mdx) instruction to set up network volume backups.

## 8. Optional: configure a global router \{#configure-global-router}

Use the [Connect products and services via Global Router](/global-router/create-network/create-global-router-network.mdx) instruction to connect your cloud server to other Selectel products and services.

<Formbricks />
