Reconnecting a VM to Cloud Backup
Note
If you have deleted a VM from Cloud Backup and want to reconnect it, use these tutorials:
Warning
When reconnecting, the VM is added to Cloud Backup as a new resource. Backups of the new VM are stored as per the linked backup policy.
The backup policy rules do not apply to the old VM's backups. Their storage is subject to the pricing policy. If you do not need those backups, delete them manually or use bulk delete.
After you restore one VM from a backup of another one, the source VM the backup was created from becomes outdated. To avoid conflicts between the two VMs during backup, reconnect the outdated VM to Cloud Backup.
Reconnecting can also help when the Cloud Backup agent stops working and goes offline.
To reconnect a VM to Cloud Backup:
-
Reconnect to Cloud Backup from the outdated VM:
LinuxWindows-
Connect to the VM over SSH.
-
Install the jq
, awk , curl , and uuidgen utilities on the VM:Note
If you are using a distribution other than Ubuntu, install the specified tools using your package manager.
sudo apt install jq -y sudo apt install gawk -y sudo apt install curl -y sudo apt install uuid-dev -yFor some distributions, you may also need to install the
uuid-runtimepackage:sudo apt install uuid-runtime -y -
Run this command:
curl 'https://storage.yandexcloud.net/backup-distributions/agent_reinit.sh' | sudo bashResult:
... Deleting old resource bound for instance_id epdoe4g6dbq4******** and resource_id: F07543A1-BDC1-415A-A143-C18E******** Updating ids in Cloud Backup Finished
-
Connect to the VM over RDP.
-
Run Windows PowerShell.
Note
The PowerShell execution policies must allow scripts. If not, allow scripts and restart PowerShell. For more information, see the Microsoft documentation
. -
Run this command:
. { iwr -useb https://storage.yandexcloud.net/backup-distributions/agent_reinit.ps1 } | iexResult:
... Backup agent reinit completed after 204 s!
-
-
Disconnect from the VM.
-
Make sure the outdated VM is no longer on the list of VMs connected to Cloud Backup:
Management console-
In the management console
, select the folder where Cloud Backup is connected. -
Navigate to Cloud Backup.
-
On
Virtual machines tab, check that the outdated VM is not listed with the label.If the VM is still there, click
, select Delete and confirm deletion.
-
-
Link your VM to a backup policy.