Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Backup

Interact with the Sanity backup API

enable

Examples
  sanity backup enable DATASET_NAME

disable

Examples
  sanity backup disable DATASET_NAME

download

Options
  --backup-id <string> The backup ID to download. (required)
  --out <string>       The file or directory path the backup should download to.
  --overwrite          Allows overwriting of existing backup file.
  --concurrency <num>  Concurrent number of backup item downloads. (max: 24)

Examples
  sanity backup download DATASET_NAME --backup-id 2024-01-01-backup-1
  sanity backup download DATASET_NAME --backup-id 2024-01-01-backup-2 --out /path/to/file
  sanity backup download DATASET_NAME --backup-id 2024-01-01-backup-3 --out /path/to/file --overwrite

list

Options
  --limit <int>     Maximum number of backups returned. Default 30.
  --after <string>  Only return backups after this date (inclusive)
  --before <string> Only return backups before this date (exclusive). Cannot be younger than <after> if specified.

Examples
  sanity backup list DATASET_NAME
  sanity backup list DATASET_NAME --limit 50
  sanity backup list DATASET_NAME --after 2024-01-31 --limit 10
  sanity backup list DATASET_NAME --after 2024-01-31 --before 2024-01-10

Was this article helpful?