# Backups

> A backup is a copy of a VM's disk, kept outside its host. Shako backs up each VM every night if its disk changed.

## Endpoints

| Method | Path | Returns |
|---|---|---|
| `GET` | [`/v1/tenants/{tenant}/vms/{name}/backups`](https://shako.dev/api/backups/list.md) | 200 with the backups object. |
| `POST` | [`/v1/tenants/{tenant}/vms/{name}/backups`](https://shako.dev/api/backups/create.md) | 201 with the backup job object. |
| `POST` | [`/v1/tenants/{tenant}/vms/{name}/backups/{id}/restore`](https://shako.dev/api/backups/restore.md) | 200 with the backup job object. |
| `DELETE` | [`/v1/tenants/{tenant}/vms/{name}/backups`](https://shako.dev/api/backups/delete.md) | 200 with the names of the path and "deleted": true. |

## Objects

- [The backups object](https://shako.dev/api/objects/vm-backups.md): The backups of a VM and its last jobs.
- [The backup job object](https://shako.dev/api/objects/backup-job.md): A backup or a restore of one VM.
