Skip to main content

Back up and restore your instance

Back up MySQL and the deployment configuration together. MySQL holds saved workspaces and accounts. The configuration identifies the images, credentials, storage, and sign-in providers that use that data.

Start with Back up and restore MySQL for the copyable export and import procedure.

Backup contents​

ItemDefault locationPurpose
MySQL databaseMYSQL_DATA_DIR, default ./mysql/dataWorkspaces, versions, accounts, tags, and migration history
MySQL configurationMYSQL_CONF_FILE, default ./mysql/mysql.cnfServer configuration
Deployment files.env, Compose files, start.sh, MySQL and Redis configurationRecreate the services with the same configuration
Image versionsIMAGE_TAG, MYSQL_IMAGE_TAG, REDIS_IMAGE_TAG and resolved image referencesMatch application and database versions
Offline license fileHost path in LICENSE_FILEMachine-bound license material
Redis sessionsredis-sessions-data volumeExisting sessions
Redis cacheredis-cache-data volumeCached responses

Compose prefixes named volumes with the project name. Inspect the Redis container mounts to find the actual names. The SQL backup procedure excludes Redis and configuration files.

A database recovery can start with empty Redis services. Users sign in again and the application rebuilds cached responses. Do not restore newer sessions or cached responses over an older database snapshot.

Configuration backup​

Copy the deployment files into the same backup set as the database dump. Include .env, the Compose files, and configuration directories. Exclude the live MySQL data directory when you use a SQL dump.

The environment file contains credentials and secrets. Store this backup with the same access controls as the database backup. Keep an off-host copy so a disk or host failure does not remove both the instance and its recovery files.

Restore the complete service​

  1. Restore the deployment files and select the recorded image versions.
  2. Restore MySQL into a fresh data directory with the database procedure.
  3. Clear stale Redis sessions and cache entries.
  4. Start the application services.
  5. Verify sign-in and a known saved workspace before restoring user access.

On a replacement host, verify DNS and the TLS proxy before directing users to it. An offline machine license depends on the host fingerprint. Use the offline license procedure for replacement license material.

Recovery checks​

Rehearse the database import before you need it. Record the backup time, restored record counts, and time needed to recover the service. Choose a backup frequency that matches how much recent work your organization can lose.

Container recreation preserves configured bind mounts and named volumes. docker compose down -v removes named volumes, including the Redis volumes. A copy of a live MySQL directory is not a replacement for a consistent database backup.

Before changing application versions, follow Updates. The API applies database migrations at startup.