Back up
Keep the database, configuration, encryption keys, and files together. These examples use Compose and PostgreSQL from the Deployment guide.
| Content | What to preserve |
|---|---|
| Database | PostgreSQL dump or managed database backup |
| Configuration | config.yml, the Compose file, and any other configuration files in use |
| Keys | secrets.keys from config.yml and the push private key |
| Files | storage and object-storage files, skills, and artifacts |
Run from the deployment directory:
mkdir -p backup
docker compose exec -T postgres pg_dump -U studio -Fc studio > "backup/studio-$(date +%F).dump"Adjust the database user and name to your configuration. Pause writes during backup or use a snapshot method that keeps database and files consistent. Back up business application databases separately.
Restore
- Stop Studio and preserve a copy of its current data.
- Restore configuration, keys, files, and database from the same backup point.
- Start the image version corresponding to that backup.
- Check sign-in, project tasks, file downloads, and Git connectivity.
Restore into a prepared empty database, for example:
docker compose exec -T postgres pg_restore -U studio -d studio < backup/studio-backup.dumpFor a database with existing data, follow your team's replacement procedure rather than adding backup records to it. Preserve the original secrets.keys in config.yml during recovery.
Upgrade Studio
- Complete the backup and obtain the target image version.
- Update
services.studio.imagein the Compose file. - Pull the image and recreate the Studio container.
docker compose pull studio
docker compose up -d studio
docker compose ps
docker compose logs --tail=100 studioMigrations run at startup. Check service health, sign-in, tasks, and runtimes. Studio is a commercial product; contact us for the image.
Before returning to an older image, check database compatibility. If migrations must be rolled back, restore the pre-upgrade database and files, then start the matching old version.
Update runners and the CLI
Runners can update automatically. You can also run these commands on the machine:
nocobase-runner update
nb-studio updatenb-studio update also updates installed skills. The runtime page identifies incompatible versions that need an update.