Unlinking a VM from a backup policy
Written by
Updated at October 17, 2024
Management console
CLI
API
- In the management console
, select a folder in which to unlink a VM from a backup policy. - In the list of services, select Cloud Backup.
- Go to the
Backup policies tab. - Select the policy to unlink the VM from.
- Under Virtual machines, click
next to the VM to be unlinked from the policy and select Detach from policy.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
View a description of the CLI command to remove a VM from a backup policy:
yc backup policy revoke --help
-
Get the ID of the policy to unlink the VM from:
yc backup policy list
Result:
+----------------------+----------------------+---------+---------+---------------------+---------------------+ | ID | FOLDER ID | NAME | ENABLED | CREATED AT | UPDATED AT | +----------------------+----------------------+---------+---------+---------------------+---------------------+ | abc7n3wln123******** | ghi681qpe789******** | policy1 | true | 2023-07-03 09:12:02 | 2023-07-03 09:12:43 | | deflqbiwc456******** | ghi681qpe789******** | policy2 | true | 2023-07-07 14:58:23 | 2023-07-07 14:58:23 | +----------------------+----------------------+---------+---------+---------------------+---------------------+
-
Get the ID of the VM to unlink:
yc compute instance list
Result:
+----------------------+---------+---------------+---------+--------------+-------------+ | ID | NAME | ZONE ID | STATUS | EXTERNAL IP | INTERNAL IP | +----------------------+---------+---------------+---------+--------------+-------------+ | jklp0o9i8012******** | my-vm-1 | ru-central1-b | RUNNING | 51.250.**.** | 192.168.*.* | | mnoa5s6d8345******** | my-vm-2 | ru-central1-b | RUNNING | 84.201.**.** | 192.168.*.* | +----------------------+---------+---------------+---------+--------------+-------------+
-
Unlink the VM by specifying its ID:
yc backup policy revoke <policy_ID> \ --instance-ids <VM_IDs>
Where
--instance-ids
are the IDs of VMs to unlink from the backup policy. Multiple IDs should be comma-separated.
For more information about the command, see the CLI reference.
Use the revoke REST API method for the Policy resource or the PolicyService/Revoke gRPC API call.