tenon backup
tenon backup writes all data of a project into one ZIP file. tenon restore writes such a file back and replaces all data. Both work on the local project or on a deployed site. For what a backup holds and other ways to make one, see Backup and restore.
tenon backup
npx tenon backup
- The CLI shows what the backup will hold: entries, media files and their size.
- It suggests a file name like
tenon-my-site-2026-11-12-1530.zip, from thenameinpackage.json, or from the host with--url. Press Enter to take it, or type another one. Without a terminal, it takes it. - It writes the file.
By default, the file is a full backup: content, versions, media files, users, API keys and jobs. The file appears only when the download is complete, so a failed backup leaves no half-written file.
read on Backup, instead of tenon login.tenon restore
npx tenon restore tenon-my-site-2026-11-12-1530.zip
- The CLI checks the file against the project, and shows what it deletes and what it writes.
- If the file does not fit, it says why and stops. Nothing changes.
- It asks whether to back up the current data first. The default is yes.
- It asks once more whether to replace all data. The default is no.
- It restores the file.
tenon login again.A full backup restores only into the same kind of database (SQLite or Postgres) and the same tenoncms version. The check says what differs. A content archive has neither limit, and leaves the users as they are.
--no-backup skips the question.--yes, the CLI backs up first only with --backup.update on Backup, instead of tenon login.Examples
Test that last night's backup restores, without changing anything:
npx tenon restore backup.zip --dry-run
Copy the content of production into your local project:
npx tenon login https://example.com
npx tenon backup --url https://example.com --content-only --out production.zip
npx tenon restore production.zip
Back up from a scheduled CI job:
TENON_URL=https://example.com TENON_API_KEY=$BACKUP_KEY npx tenon backup --out "backup-$(date +%F).zip"
Related resources
- Backup and restore: what each kind of backup holds, and import modes.
- Overview: local or remote, and CI.
- tenon upgrade: back up before an upgrade.