Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Backup
    • All guides
    • Activating the service
      • Connecting an external resource
    • Restoring the Cloud Backup agent
    • Viewing operations on service resources
    • Limiting RAM usage by the Cloud Backup agent
    • Viewing backup statistics
    • Setting up Monium alerts
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • Troubleshooting
  1. Step-by-step guides
  2. External resources in Cloud Backup
  3. Connecting an external resource

Connecting a VM or server from outside Yandex Cloud to Cloud Backup

Written by
Yandex Cloud
Updated at July 29, 2026
View in Markdown

With Yandex Cloud Backup, you can back up and recover virtual machines and servers located within your own infrastructure or that of a third-party provider.

To connect an external VM or server to Cloud Backup, the resource must be running one of the supported operating systems.

For the proper Cloud Backup agent operation, the VM must meet the minimum requirements.

To connect an external VM or server running a Linux Ubuntu OS to Cloud Backup:

Management console
Yandex Cloud CLI
API
  1. In the management console, select the folder where you want to connect your external resource to Cloud Backup.

  2. Navigate to Cloud Backup.

  3. In the left-hand panel, select  Connected resources.

  4. In the top-right corner, click  Connect external resource.

  5. In the Connect external resource window that opens:

    1. In the Resource type field, select the type of the external resource you want to connect: External virtual machine or External server.
    2. In the Backup policies field, select one or more backup policies to automatically apply to the external resource after installing the agent. You can also associate these policies later.
    3. Under Command to install the Cloud Backup agent, copy the command for installing the Cloud Backup agent on an external resource.
  6. Connect to the external VM or server and run the command you copied with administrator privileges.

    Result:

    ...
    Fetched instance id from file: cdgd246kiae3********
    fetched registration token: 802C-AE...
    installing agent with rain https://ru01-cloud.cyberprotect.ru (log: /var/log/baas-agent-installer/log.txt)
    Trying to register agent using RegisterAgent...
    Agent registered with id E6B1A5DC-ECE0-****-A9B8-AFD2********
    
  7. Make sure the external resource is connected to Cloud Backup. To do this, on the Connected resources page, open the External virtual machines or External servers tab, depending on your resource type. The list should include the resource you connected.

  1. Install and initialize the Yandex Cloud CLI.

    You can install the Yandex Cloud CLI either directly on your target VM or server or on any other machine.

    The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

    Warning

    Make sure the account you got authenticated under when creating the Yandex Cloud CLI profile has the backup.user role or higher. If needed, assign the required role to your account.

  2. Get the script code for installing the Cloud Backup agent on an external resource. The exact command depends on the type of resource you want to connect:

    VM
    Server
    yc backup agent install-external vm
    

    Result:

    sudo apt-get update && sudo apt-get install -y jq gawk curl && curl https://storage.yandexcloud.net/backup-distributions/agent_installer_external_vm.sh | sudo bash -s -- --instance-registration-token="13d1d696-0ea4-****-93a9-f8c5********"
    
    yc backup agent install-external server
    

    Result:

    sudo apt-get update && sudo apt-get install -y jq gawk curl && curl https://storage.yandexcloud.net/backup-distributions/agent_installer_external_server.sh | sudo bash -s -- --instance-registration-token="ed6991f2-f364-****-a08e-75a7********"
    
  3. Run the bash script you got in the previous step:

    VM
    Server
    sudo apt-get update && \
      sudo apt-get install -y jq gawk curl && \
      curl https://storage.yandexcloud.net/backup-distributions/agent_installer_external_vm.sh | sudo bash -s -- --instance-registration-token="13d1d696-0ea4-****-93a9-f8c5********"
    
    sudo apt-get update && \
      sudo apt-get install -y jq gawk curl && \
      curl https://storage.yandexcloud.net/backup-distributions/agent_installer_external_server.sh | sudo bash -s -- --instance-registration-token="ed6991f2-f364-****-a08e-75a7********"
    

    Result:

    ...
    Fetched instance id from file: cdgd246kiae3********
    fetched registration token: 802C-AE...
    installing agent with rain https://ru01-cloud.cyberprotect.ru (log: /var/log/baas-agent-installer/log.txt)
    Trying to register agent using RegisterAgent...
    Agent registered with id E6B1A5DC-ECE0-****-A9B8-AFD2********
    

    Your external resource is now connected to Cloud Backup and has an ID. In the above example, this is cdgd246kiae3********.

  4. Make sure the external resource is connected to Cloud Backup by specifying the ID you got in the previous step:

    yc backup vm get <external_resource_ID_in_Cloud_Backup>
    

    Result:

    compute_instance_id: cdgd246kiae3********
    created_at: "2026-04-24T14:23:06.382900082Z"
    updated_at: "2026-04-29T19:48:22.013489248Z"
    enabled: true
    status: IDLE
    last_backup_time: "2026-04-27T13:07:05Z"
    next_backup_time: "2026-04-29T21:00:00Z"
    resource_id: d1fdd342-0ea8-****-9906-fa6c********
    is_active: true
    init_status: REGISTRED
    metadata: "null"
    type: EXTERNAL_VM
    agent_info:
      current_version: 18.0.38811
    
  1. Get the command for installing the Cloud Backup agent on an external resource. To do this, use the getAgentInstallCommand REST API method for the Setup resource or the SetupService/GetAgentInstallCommand gRPC API call. In the request parameters, specify the target resource type: EXTERNAL_VM or EXTERNAL_SERVER.
  2. Connect to the external VM or server and run the command with administrator privileges.
  3. Once the agent is installed, the external resource is automatically registered in Cloud Backup. To get a list of connected resources, use the list REST API method for the Resource resource or the ResourceService/List gRPC API call.

To back up and restore your connected external resource using Cloud Backup, associate that resource with a backup policy. For more information, see Linking a resource to a backup policy.

Useful linksUseful links

  • Connecting VMs and servers from outside Yandex Cloud to Cloud Backup
  • Linking a resource to a backup policy
  • Creating a backup of a resource
  • Recovering an external VM or server from a backup

Was the article helpful?

Previous
Reconnecting a BareMetal server to Cloud Backup
Next
Creating a policy
© 2026 Direct Cursus Technology L.L.C.