Studio · Administration

Upgrades and backups

Back up

Keep the database, configuration, encryption keys, and files together. These examples use Compose and PostgreSQL from the Deployment guide.

ContentWhat to preserve
DatabasePostgreSQL dump or managed database backup
Configurationconfig.yml, the Compose file, and any other configuration files in use
Keyssecrets.keys from config.yml and the push private key
Filesstorage and object-storage files, skills, and artifacts

Run from the deployment directory:

Bash
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

  1. Stop Studio and preserve a copy of its current data.
  2. Restore configuration, keys, files, and database from the same backup point.
  3. Start the image version corresponding to that backup.
  4. Check sign-in, project tasks, file downloads, and Git connectivity.

Restore into a prepared empty database, for example:

Bash
docker compose exec -T postgres pg_restore -U studio -d studio   < backup/studio-backup.dump

For 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

  1. Complete the backup and obtain the target image version.
  2. Update services.studio.image in the Compose file.
  3. Pull the image and recreate the Studio container.
Bash
docker compose pull studio
docker compose up -d studio
docker compose ps
docker compose logs --tail=100 studio

Migrations 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:

Bash
nocobase-runner update
nb-studio update

nb-studio update also updates installed skills. The runtime page identifies incompatible versions that need an update.

NocoBase docs assistant

Ask anything about NocoBase…

Each question is answered independently, without earlier questions or answers. Include all relevant context.