Backup & Restore¶
The depictio backup commands let administrators snapshot the MongoDB database and restore it from a previous backup. All backup operations require admin credentials.
Admin only
All backup sub-commands require the authenticated user to be an administrator.
Commands¶
backup create¶
Create a server-side snapshot of the MongoDB database. Short-lived tokens and temporary users are excluded automatically.
depictio backup create
# Also back up S3 Delta Lake files
depictio backup create --include-s3-data --s3-backup-prefix my-backup
| Flag | Default | Description |
|---|---|---|
--include-s3-data |
false |
Also back up S3 Delta Lake files |
--s3-backup-prefix |
"backup" |
Prefix for the S3 backup folder |
--dry-run |
false |
Validate the backup process without writing anything |
On success, prints a backup ID (format YYYYMMDD_HHMMSS) and document counts per collection.
backup list¶
List all available backups stored on the server.
backup validate¶
Check that a backup file is well-formed and passes Pydantic model validation before attempting a restore.
backup restore¶
Destructive operation
Restore replaces existing data in the selected collections. Use --dry-run first to preview what would change.
Restore all or selected collections from a backup snapshot.
# Preview first
depictio backup restore 20260315_143000 --dry-run
# Restore everything (prompts for confirmation)
depictio backup restore 20260315_143000
# Restore specific collections only
depictio backup restore 20260315_143000 --collections projects,dashboards
# Skip confirmation prompt (automation / CI)
depictio backup restore 20260315_143000 --force
| Flag | Default | Description |
|---|---|---|
--dry-run |
false |
Simulate restore without writing any changes |
--collections |
all | Comma-separated list of collections to restore |
--force |
false |
Skip the confirmation prompt |