> For the complete documentation index, see [llms.txt](https://docs.reviactyl.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reviactyl.app/client-api/backup.md).

# Backup

## GET /servers/{server}/backups

> Returns all the backups for a given server instance in a paginated\
> result set

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/backups":{"get":{"operationId":"backup.index","summary":"Returns all the backups for a given server instance in a paginated\nresult set","tags":["Backup"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}}
```

## POST /servers/{server}/backups

> Starts the backup process for a server

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/backups":{"post":{"operationId":"backup.store","summary":"Starts the backup process for a server","tags":["Backup"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreBackupRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"schemas":{"StoreBackupRequest":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":191},"is_locked":{"type":["boolean","null"]},"ignored":{"type":["string","null"]},"format":{"type":"string","enum":["tar.gz","zip"]}},"title":"StoreBackupRequest"}},"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```

## GET /servers/{server}/backups/{backup}

> Returns information about a single backup

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/backups/{backup}":{"get":{"operationId":"backup.view","summary":"Returns information about a single backup","tags":["Backup"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"backup","in":"path","required":true,"description":"The backup UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}}
```

## DELETE /servers/{server}/backups/{backup}

> Deletes a backup from the panel as well as the remote source where it is currently\
> being stored

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/backups/{backup}":{"delete":{"operationId":"backup.delete","summary":"Deletes a backup from the panel as well as the remote source where it is currently\nbeing stored","tags":["Backup"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"backup","in":"path","required":true,"description":"The backup UUID","schema":{"type":"string"}}],"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}}
```

## GET /servers/{server}/backups/{backup}/download

> Download the backup for a given server instance. For daemon local files, the file\
> will be streamed back through the Panel. For AWS S3 files, a signed URL will be generated\
> which the user is redirected to

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/backups/{backup}/download":{"get":{"operationId":"backup.download","summary":"Download the backup for a given server instance. For daemon local files, the file\nwill be streamed back through the Panel. For AWS S3 files, a signed URL will be generated\nwhich the user is redirected to","tags":["Backup"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"backup","in":"path","required":true,"description":"The backup UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","const":"signed_url"},"attributes":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}},"required":["object","attributes"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}}
```

## Rename the backup alias shown in the panel

> This does not change the archived filename on disk.

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/backups/{backup}/rename":{"post":{"operationId":"backup.rename","description":"This does not change the archived filename on disk.","summary":"Rename the backup alias shown in the panel","tags":["Backup"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"backup","in":"path","required":true,"description":"The backup UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":191}},"required":["name"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```

## POST /servers/{server}/backups/{backup}/lock

> Toggles the lock status of a given backup for a server

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/backups/{backup}/lock":{"post":{"operationId":"backup.toggleLock","summary":"Toggles the lock status of a given backup for a server","tags":["Backup"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"backup","in":"path","required":true,"description":"The backup UUID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{}}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"}}}}},"components":{"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}}}
```

Handles restoring a backup by making a request to the Agent instance telling it\
to begin the process of finding (or downloading) the backup and unpacking it\
over the server files
---------------------

> If the "truncate" flag is passed through in this request then all the\
> files that currently exist on the server will be deleted before restoring.\
> Otherwise, the archive will simply be unpacked over the existing files.

```json
{"openapi":"3.1.0","info":{"title":"Reviactyl","version":"0.0.1"},"servers":[{"url":"https://reviactyl.test/api/client"}],"paths":{"/servers/{server}/backups/{backup}/restore":{"post":{"operationId":"backup.restore","description":"If the \"truncate\" flag is passed through in this request then all the\nfiles that currently exist on the server will be deleted before restoring.\nOtherwise, the archive will simply be unpacked over the existing files.","summary":"Handles restoring a backup by making a request to the Agent instance telling it\nto begin the process of finding (or downloading) the backup and unpacking it\nover the server files","tags":["Backup"],"parameters":[{"name":"server","in":"path","required":true,"description":"The server ID","schema":{"type":"integer"}},{"name":"backup","in":"path","required":true,"description":"The backup UUID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreBackupRequest"}}}},"responses":{"204":{"description":"No content","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"403":{"$ref":"#/components/responses/AuthorizationException"},"404":{"$ref":"#/components/responses/ModelNotFoundException"},"422":{"$ref":"#/components/responses/ValidationException"}}}}},"components":{"schemas":{"RestoreBackupRequest":{"type":"object","properties":{"truncate":{"type":"boolean"}},"required":["truncate"],"title":"RestoreBackupRequest"}},"responses":{"AuthorizationException":{"description":"Authorization error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.reviactyl.app/client-api/backup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
