Backups and restore
Back up and restore Studio and Runtime data volumes.
Backups and restore
Open Ticket AI stores state in three SQLite databases and .env.
Ticket content remains in your ticket system and requires its own backup strategy (OTOBO / Zammad / KIX).
What a backup contains
Each archive under backups/otai-backup-<timestamp>.tar.gz includes:
| Item | Purpose |
|---|---|
Studio SQLite (otai-studio.db) | AI tasks, options, config audit |
Runtime SQLite (otai-runtime.db) | Workflow run history / KPIs |
Chatbot SQLite (otai-chatbot.db) | Customer/agent Help Chat session history |
.env | License key, connector credentials, version pins |
docker-compose/ | Compose snapshot used with that install |
meta.json | Version, timestamp, volume names |
Default retention: last 14 archives (OTAI_BACKUP_KEEP to change).
Create a backup
otai backup
The command outputs the archive path. SQLite databases are dumped online via running containers when possible.
Periodic backups
The installer prompts to enable daily backups by default. Change the schedule anytime:
otai backup --schedule daily # cron at 02:30 local
otai backup --schedule weekly
otai backup --schedule off
As root, this writes /etc/cron.d/otai-backup; otherwise it updates the user crontab. If cron is unavailable, the CLI prints a string for your custom scheduler.
Combine with your general backup strategy
- Run
otai backupon your regular config backup schedule. - Sync the
backups/directory to encrypted off-host storage. - Back up your ticket system database separately (OTAI backups do not contain ticket data).
- Secure backup archives appropriately because
.envcontains credentials.
Restore
otai restore latest
# or:
otai restore /path/to/otai-backup-20260726T120000Z.tar.gz
Restore stops services, restores .env, compose files, and databases to their volumes, starts the stack, and runs otai verify.
Disaster recovery order
- Restore and start the ticket system if needed.
- Restore the OTAI install tree (compose + CLI) if rebuilding the host.
- Run
otai restore <archive>(or syncbackups/and runotai restore latest). - Run
otai verifyand verify Studio access from the ticket system.
Related
- Installation
- Updates (automatically backs up before upgrading)
