mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
docs/vmbackupmanager.md: run make docs-sync
after c7d8dda39225b716ea44df7223db5e4a125d407b
This commit is contained in:
parent
ad35081066
commit
4f6680f399
@ -154,6 +154,30 @@ The result on the GCS bucket. We see only 3 daily backups:
|
|||||||
|
|
||||||
![daily](vmbackupmanager_rp_daily_2.png)
|
![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=<DST_PATH> -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=<DST_PATH> -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=<DST_PATH> -storageDataPath=/vmstorage-data -eula
|
||||||
|
```
|
||||||
|
|
||||||
## API methods
|
## API methods
|
||||||
|
|
||||||
@ -166,6 +190,22 @@ The result on the GCS bucket. We see only 3 daily backups:
|
|||||||
```
|
```
|
||||||
> Note: `created_at` field is in RFC3339 format.
|
> Note: `created_at` field is in RFC3339 format.
|
||||||
|
|
||||||
|
* GET `/api/v1/backups/<BACKUP_NAME>` - 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/<BACKUP_NAME>` - 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).
|
* POST `/api/v1/restore` - saves backup name to restore when [performing restore](#restore-commands).
|
||||||
Example request body:
|
Example request body:
|
||||||
```json
|
```json
|
||||||
@ -191,6 +231,12 @@ vmbackupmanager backup
|
|||||||
vmbackupmanager backup list
|
vmbackupmanager backup list
|
||||||
List backups in remote storage
|
List backups in remote storage
|
||||||
|
|
||||||
|
vmbackupmanager backup lock
|
||||||
|
Locks backup in remote storage against deletion
|
||||||
|
|
||||||
|
vmbackupmanager backup unlock
|
||||||
|
Unlocks backup in remote storage for deletion
|
||||||
|
|
||||||
vmbackupmanager restore
|
vmbackupmanager restore
|
||||||
Restore backup specified by restore mark if it exists
|
Restore backup specified by restore mark if it exists
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user