Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Backup
  • Getting started
    • All guides
    • Activating the service
      • Creating and connecting a Linux VM
      • Creating and connecting a Windows VM
      • Connecting a Linux VM
      • Connecting a Linux VM with OS Login
      • Connecting a Windows VM
      • Updating a VM connection to Cloud Backup
      • Updating or restoring a Cloud Backup agent
      • Updating a Linux VM connection with OS Login
      • Viewing VM connection settings
      • Viewing backup log
      • Deleting a VM from Cloud Backup
    • Viewing operations with resources
    • Viewing backup statistics
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • Troubleshooting

In this article:

  • Getting started
  • Creating a VM
  1. Step-by-step guides
  2. VM in Cloud Backup
  3. Creating and connecting a Linux VM

Creating a Linux VM with a connection to Cloud Backup

Written by
Yandex Cloud
Improved by
Danila N.
Updated at April 22, 2025
  • Getting started
  • Creating a VM

You can back up Compute Cloud VMs with supported Linux-based operating systems.

For the Cloud Backup agent to work correctly, the VM must meet the minimum requirements.

Getting startedGetting started

  1. Create a service account with the backup.editor role.
  2. Set up network access for your VM.

Creating a VMCreating a VM

Management console
CLI
  1. In the management console, select the folder where you want to create a VM.

  2. In the list of services, select Compute Cloud.

  3. In the left-hand panel, select Virtual machines and click Create virtual machine.

  4. Under Boot disk image, select an operating system supported in Cloud Backup.

  5. Under Location, select an availability zone to place your VM in.

  6. Under Network settings:

    1. Choose a subnet in the selected availability zone.
    2. In the Public IP address field, select Auto.
    3. Select a security group configured to work with Cloud Backup.
  7. Under General information, specify the VM name and description. The naming requirements are as follows:

    • It must be from 2 to 63 characters long.
    • It may contain lowercase Latin letters, numbers, and hyphens.
    • It must start with a letter and cannot end with a hyphen.

    Note

    The VM name is used to generate an internal FQDN, which is set only once, when you create the VM. If the internal FQDN is important to you, make sure to choose an appropriate name for your VM.

  8. Under Additional:

    1. Select the service account with the backup.editor role.
    2. Enable Cloud Backup.
    3. Optionally, select a backup policy or click Create to create a new one.
  9. Specify the other VM parameters as needed. For more information, see Creating a VM from a public Linux image.

  10. Click Create VM.

When the VM switches to the Running status, a Cloud Backup agent will start installing on it. This may take from 5 to 10 minutes.

  1. Select a folder:

    yc resource-manager folder list
    

    Result:

    +----------------------+--------------------+------------------+--------+
    |          ID          |        NAME        |      LABELS      | STATUS |
    +----------------------+--------------------+------------------+--------+
    | wasdcjs6be29******** | my-folder          |                  | ACTIVE |
    | qwertys6be29******** | default            |                  | ACTIVE |
    +----------------------+--------------------+------------------+--------+
    
  2. Select a subnet:

    yc vpc subnet list --folder-id <folder_ID>
    

    Result:

    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    |          ID          |           NAME            |      NETWORK ID      | ROUTE TABLE ID |       ZONE        |      RANGE      |
    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    | b0c6n43f9lgh******** | default-ru-central1-d     | enpe3m3fa00u******** |                | ru-central1-d     | [10.***.0.0/24] |
    | e2l2da8a20b3******** | default-ru-central1-b     | enpe3m3fa00u******** |                | ru-central1-b     | [10.***.0.0/24] |
    | e9bnlm18l70a******** | default-ru-central1-a     | enpe3m3fa00u******** |                | ru-central1-a     | [10.***.0.0/24] |
    +----------------------+---------------------------+----------------------+----------------+-------------------+-----------------+
    
  3. Create a VM:

    yc compute instance create \
      --folder-id <folder_ID> \
      --name <VM_name> \
      --zone <availability_zone> \
      --network-interface subnet-name=<subnet_name>,nat-ip-version=ipv4,security-group-ids=<security_group_ID> \
      --create-boot-disk image-id=<image_ID>,size=<boot_disk_size> \
      --cores 2 \
      --core-fraction 100 \
      --memory 4 \
      --service-account-name <service_account_name> \
      --ssh-key <path_to_public_SSH_key>
    

    Where:

    • --folder-id: Folder ID.

    • --name: Name of the new VM.

      Note

      The VM name is used to generate an internal FQDN, which is set only once, when you create the VM. If the internal FQDN is important to you, make sure to choose an appropriate name for your VM.

    • --zone: Availability zone matching the selected subnet.

    • subnet-name: Name of the selected subnet.

    • security-group-ids: ID of the security group configured to work with Cloud Backup.

    • image-id: OS image ID. See the list of supported Linux-based operating systems for details.

    • size: Boot disk size.

    • --cores: Number of vCPUs in the VM.

    • --core-fraction: Guaranteed vCPU share in %.

    • --memory: VM RAM size.

    • --service-account-name: Name of the service account with the backup.editor role.

    • --ssh-key: Path to the file with the public SSH key. The VM will automatically create a user named yc-user for this key.

    In this example, we are creating a VM running Ubuntu 20.04:

    yc compute instance create \
      --folder-id wasdcjs6be29******** \
      --name my-vm \
      --zone ru-central1-b \
      --network-interface subnet-name=my-vpc-ru-central1-b,nat-ip-version=ipv4,security-group-ids=abcd3570sbqg******** \
      --create-boot-disk image-id=fd8ecgtorub9********,size=25 \
      --cores 2 \
      --core-fraction 100 \
      --memory 4 \
      --service-account-name backup-editor \
      --ssh-key my-key.pub
    

    Result:

    done (46s)
    id: abcdho6nspdk********
    folder_id: wasdcjs6be29********
    created_at: "2023-10-09T14:57:06Z"
    name: my-vm
    ...
          one_to_one_nat:
            address: 158.***.**.***
    ...
    placement_policy: {}
    
  4. Connect to the VM over SSH. Establish a connection as yc-user and use the VM's public IP address from the create VM command output under one_to_one_nat.

  5. Install the Cloud Backup agent:

    Ubuntu

    sudo apt update && \
    sudo apt install -y jq && \
    curl https://storage.yandexcloud.net/backup-distributions/agent_installer.sh | sudo bash
    

    Result:

    ...
    Agent registered with id D9CA44FC-716A-4B3B-A702-C6**********
    

    CentOS

    sudo yum install epel-release -y && \
    sudo yum update -y && \
    sudo yum install jq -y && \
    curl https://storage.yandexcloud.net/backup-distributions/agent_installer.sh | sudo bash
    

    Result:

    ...
    Agent registered with id D9CA44FC-716A-4B3B-A702-C6**********
    

Note

If the Cloud Backup agent fails to install within 10 minutes, contact support to diagnose the issue.

Once you install the Cloud Backup agent, the VM will be added to Cloud Backup in the Virtual machines tab and you will be able to link it to a backup policy. If you selected a backup policy when creating the VM, then the VM is already linked to the policy and no further action is required.

See alsoSee also

  • Connecting a Windows Server VM to Cloud Backup
  • Connecting a Linux VM to Cloud Backup
  • Linking a VM to a backup policy
  • Restoring a VM or Yandex BareMetal server from a backup
  • Delete backup
  • Creating a backup policy

Was the article helpful?

Previous
Activating the service
Next
Creating and connecting a Windows VM
© 2025 Direct Cursus Technology L.L.C.