Creates a new backup of the specified VM. This operation is asynchronous.
/v1/projects/:projectId/vms/:vmId/backupsThis endpoint takes no request body; the VM to back up is identified entirely by the route parameters.
Retention: each VM keeps at most a fixed number of backups (currently 7). When creating a new backup would exceed this cap, the oldest existing backup for the VM is deleted automatically first. The create request does not fail because of this — it simply takes slightly longer, since the old backup is deleted before the new one starts being created.
A 202 response only means the request was accepted, not that the backup exists yet. The
CommandId returned in CommandAccepted is an internal identifier and is not
queryable via any public endpoint. To observe completion, poll
GET /v{version}/projects/{projectId}/vms/{vmId} and watch OperationStatus (it reports
InProgress with Operation equal to CreateBackup while the backup is being created), or
poll this backups list and watch for the new backup to appear — a list entry appears only after the
backup completes successfully; if creation fails, no entry is ever created.
While a backup operation is in progress, the VM is locked: starting/stopping it, creating another backup,
or performing other operations on the same VM fails with 409 Conflict until the operation completes.
Request
Responses
- 202
- 400
- 404
- 409
The backup creation request was accepted for asynchronous processing.
The request was invalid.
The project or VM was not found.
The VM has another operation in progress.