From 60bdbdaa70ffe6a8c9d72cc8d5957f4f549ab185 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 16 May 2023 11:27:23 -0700 Subject: [PATCH] docs/vmbackupmanager.md: run `make docs-sync` after c7d8dda39225b716ea44df7223db5e4a125d407b --- docs/vmbackupmanager.md | 50 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/docs/vmbackupmanager.md b/docs/vmbackupmanager.md index 4071a0dca..1aace3154 100644 --- a/docs/vmbackupmanager.md +++ b/docs/vmbackupmanager.md @@ -154,6 +154,30 @@ The result on the GCS bucket. We see only 3 daily backups: ![daily](vmbackupmanager_rp_daily_2.png) +### Protection backups against deletion by retention policy + +You can protect any backup against deletion by retention policy with the `vmbackupmanager backups lock` command. + +For instance: + +```console +./vmbackupmanager backup lock daily/2021-02-13 -dst= -storageDataPath=/vmstorage-data -eula +``` + +After that the backup won't be deleted by retention policy. +You can view the `locked` attribute in backup list: + +```console +./vmbackupmanager backup list -dst= -storageDataPath=/vmstorage-data -eula +``` + +To remove protection, you can use the command `vmbackupmanager backups unlock`. + +For example: + +```console +./vmbackupmanager backup unlock daily/2021-02-13 -dst= -storageDataPath=/vmstorage-data -eula +``` ## API methods @@ -164,7 +188,23 @@ The result on the GCS bucket. We see only 3 daily backups: ```json [{"name":"daily/2023-04-07","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:07+00:00"},{"name":"hourly/2023-04-07:11","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:06+00:00"},{"name":"latest","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:04+00:00"},{"name":"monthly/2023-04","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:10+00:00"},{"name":"weekly/2023-14","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:09+00:00"}] ``` - > Note: `created_at` field is in RFC3339 format. + > Note: `created_at` field is in RFC3339 format. + +* GET `/api/v1/backups/` - returns backup info by name. + Example output: + ```json + {"name":"daily/2023-04-07","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:07+00:00","locked":true} + ``` + +* PUT `/api/v1/backups/` - update "locked" attribute for backup by name. + Example request body: + ```json + {"locked":true} + ``` + Example response: + ```json + {"name":"daily/2023-04-07","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:07+00:00", "locked": true} + ``` * POST `/api/v1/restore` - saves backup name to restore when [performing restore](#restore-commands). Example request body: @@ -191,7 +231,13 @@ vmbackupmanager backup vmbackupmanager backup list List backups in remote storage -vmbackupmanager restore + vmbackupmanager backup lock + Locks backup in remote storage against deletion + + vmbackupmanager backup unlock + Unlocks backup in remote storage for deletion + +vmbackupmanager restore Restore backup specified by restore mark if it exists vmbackupmanager restore get