Backup API

Manage backups programmatically through the HTTP API.

List backups

GET /api/backup/list
[
  {
    "key": "sendword/sendword-2024-01-15T02:00:00.tar.gz",
    "size": 524288,
    "last_modified": "2024-01-15T02:00:05Z"
  }
]

Create backup

POST /api/backup/create

Creates a new backup and uploads to S3. Returns the backup key:

{
  "key": "sendword/sendword-2024-01-16T02:00:00.tar.gz"
}

Restore from backup

POST /api/backup/restore
Content-Type: application/json
{
  "from": "sendword/sendword-2024-01-15T02:00:00.tar.gz",
  "output": "/opt/sendword/restored"
}

Downloads and extracts the backup to the specified directory.