Creating a backup of a resource
To create a backup of a resource, connect it to Cloud Backup and link it to at least one backup policy. All backups are created only as part of policies.
Cloud Backup automatically creates backups based on the schedule detailed in a policy.
To create an out-of-schedule backup:
-
In the management console
, select the folder containing your backup policy. -
Navigate
to Cloud Backup. -
In the left-hand panel, select
Connected resources. -
Depending on the type of resource you want to back up, open the following tab:
- Virtual machines: For Compute Cloud VMs.
- BareMetal servers: For BareMetal servers.
- External virtual machines: For external VMs.
- External servers: For external servers.
-
In the row with the resource, click
and select Create backup. -
In the window that opens, select the backup policy for creating the backup and click Create.
This will start the backup creation process. You can see the progress in the Server status field of the resource row.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
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.
-
View the description of the CLI command to create a backup:
yc backup policy execute --help -
Get the ID of the backup policy the backup will be based on:
yc backup policy listResult:
+----------------------+----------------------+---------+---------+---------------------+---------------------+ | 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 resource you want to back up:
yc backup vm listResult:
+----------------------+--------------------------------------+--------+---------+--------+-----------------+----------------+---------------------+---------------------+--------+---------------------+---------------------+-------------+ | INSTANCE ID | RESOURCE ID | ONLINE | ENABLED | STATUS | STATUS PROGRESS | STATUS DETAILS | LAST BACKUP TIME | NEXT BACKUP TIME | ACTIVE | CREATED AT | UPDATED AT | TYPE | +----------------------+--------------------------------------+--------+---------+--------+-----------------+----------------+---------------------+---------------------+--------+---------------------+---------------------+-------------+ | ly5mzirn6xhd******** | 4fc0d855-b76c-****-99a4-bf01******** | true | true | IDLE | 0 | | | | true | 2026-04-29 05:45:34 | 2026-04-29 05:54:21 | BMS | | epd930eo5156******** | 6c58577d-409d-****-bc10-f464******** | true | true | IDLE | 0 | | | | true | 2026-04-29 08:46:47 | 2026-04-29 08:54:00 | COMPUTE | | cdgd246kiae3******** | d1fdd342-0ea8-****-9906-fa6c******** | false | true | IDLE | 0 | | 2026-04-27 13:07:05 | 2026-04-27 13:07:05 | true | 2026-04-24 14:23:06 | 2026-04-29 08:54:33 | EXTERNAL_VM | +----------------------+--------------------------------------+--------+---------+--------+-----------------+----------------+---------------------+---------------------+--------+---------------------+---------------------+-------------+ -
Create a backup:
yc backup policy execute \ --id <policy_ID> \ --instance-id <resource_ID>Where:
--id: ID of the backup policy the backup will be based on.--instance-id: ID of the Compute Cloud VM, BareMetal server, or external resource to back up.
Result:
id: abcsdngawmqv******** description: execute policy created_at: "2024-08-19T09:38:06.015732Z" created_by: def9k8luj4qf******** modified_at: "2024-08-19T09:38:06.015732Z" metadata: '@type': type.googleapis.com/yandex.cloud.backup.v1.ExecuteMetadata policy_id: hij86k3tu3pu******** compute_instance_id: klmc87d7q49r********
For more information about this command, see the CLI reference.
Use the execute REST API method for the Policy resource or the PolicyService/Execute gRPC API call.