Backup and Restore
AI Admin Panel provides backup and restore capabilities for deployed services. Backups capture service data, configuration, and volume contents.
Backup Types
On-Demand Backup
Trigger a backup at any time from the service detail page:
- Navigate to the service
- Click Actions > Backup
- The panel creates a backup job that runs in the background
- Progress is shown in real time via WebSocket
- Once complete, the backup appears in the backup list
Scheduled Backups
Configure automatic backups on a schedule:
- Navigate to Settings > Backup
- Enable scheduled backups
- Set the schedule (daily, weekly, or custom cron expression)
- Set retention policy (number of backups to keep)
- Click Save
Example cron expressions:
| Schedule | Cron Expression |
|---|---|
| Daily at 2 AM | 0 2 * * * |
| Weekly on Sunday at 3 AM | 0 3 * * 0 |
| Every 6 hours | 0 */6 * * * |
What Gets Backed Up
For each service, the backup includes:
| Component | Method | Description |
|---|---|---|
| Docker volumes | Archive | Tar archive of all named volumes |
| Database data | Native dump | pg_dump, mysqldump, mongodump for known database services |
| Service config | Export | Docker Compose file, environment variables, Traefik labels |
| Metadata | JSON | Service record, customer, plan, deploy history |
Database-specific backups use native tools for consistency:
- PostgreSQL:
pg_dump(SQL format) - MySQL/MariaDB:
mysqldump(SQL format) - MongoDB:
mongodump(BSON format) - Redis: RDB snapshot copy
Storage Targets
Local Storage
By default, backups are stored locally at /opt/aiadminpanel/backups/:
/opt/aiadminpanel/backups/
{service-name}/
backup-2026-03-29-020000.tar.gz
backup-2026-03-22-020000.tar.gz
S3-Compatible Storage
Configure remote storage for off-server backups:
- Navigate to Settings > Backup > Storage
- Select S3-Compatible
- Fill in:
| Field | Description |
|---|---|
| Endpoint | S3 endpoint URL (e.g., https://s3.amazonaws.com or MinIO URL) |
| Bucket | Bucket name |
| Region | AWS region (e.g., us-east-1) |
| Access Key | S3 access key ID |
| Secret Key | S3 secret access key |
| Path Prefix | Optional prefix for backup objects (e.g., backups/) |
Compatible with AWS S3, MinIO, Backblaze B2, Cloudflare R2, and any S3-compatible provider.
Restoring from Backup
To restore a service from a backup:
- Navigate to the service detail page
- Click Actions > Restore
- Select the backup to restore from
- Confirm the restore operation
The restore process:
- Stops the service
- Replaces volume contents with the backup data
- Restores database from the native dump (if applicable)
- Restarts the service
- Verifies the health check passes
Warning: Restoring overwrites current service data. The panel creates an automatic backup of the current state before restoring, in case you need to undo the restore.
Backup Management
Viewing Backups
Navigate to Settings > Backup to see all backups across services, or view per-service backups in the service detail page.
Each backup entry shows:
| Field | Description |
|---|---|
| Service | Which service was backed up |
| Size | Compressed backup size |
| Duration | How long the backup took |
| Created | When the backup was created |
| Status | Success / Failed / In Progress |
| Storage | Local / S3 |
Retention Policy
Configure how many backups to retain:
- Count-based: Keep the last N backups per service (default: 7)
- Time-based: Keep backups for N days (e.g., 30 days)
- Combination: Keep the last 7 daily + last 4 weekly
Old backups are automatically deleted when new backups are created.
Manual Deletion
Individual backups can be deleted from the backup list. Deletion removes both the backup metadata and the stored archive.
Infrastructure Backup
In addition to service backups, ensure you back up the panel's own infrastructure:
# Backup panel database
docker exec aiadminpanel_postgresql pg_dump -U aiadminpanel -d aiadminpanel > panel-backup.sql
# Backup Keycloak database
docker exec aiadminpanel_postgresql pg_dump -U aiadminpanel -d keycloak > keycloak-backup.sql
# Backup secrets
cp -r /opt/aiadminpanel/.env /opt/aiadminpanel/backup-env
Set up a cron job for automated infrastructure backups as these are not managed by the panel's backup system.