Skip to content

Upgrade, back up and restore ​

Maintain a self-hosted Rundial installation and recover its data from a backup.

Stop and start ​

From the source checkout, run:

bash
bash scripts/setup/open_core_down.sh
bash scripts/setup/open_core_up.sh

The first command stops the stack without removing its volumes.

Back up ​

bash
bash scripts/ops/backup.sh

Backup stops Rundial while it runs and starts it again when it finishes. The command prints the archive path. Replace <archive> with that path to verify it:

bash
bash scripts/ops/restore.sh --archive <archive> --verify

Store the archive and the deployment's .env secrets securely and separately. The archive defaults to tmp/backups; --output-dir <dir> changes the destination, --name <name> changes its name, and --dry-run prints the plan.

Restore ​

Warning

Restore replaces existing volume data. Keep a separate backup before proceeding.

Restore with the same checkout version that made the backup. Restore requires Python on the host, and the services must run the same images they ran when you made the backup. If it reports Image identity mismatch, the images changed after the backup, for example in an upgrade; start the services from the images the backup recorded, then retry. Verify the archive first, then replace <archive> with the path printed by the backup command:

bash
bash scripts/ops/restore.sh --archive <archive> --verify
bash scripts/ops/restore.sh --archive <archive> --destroy-existing

Restore leaves services stopped. Start the existing containers with the matching backup images:

bash
docker compose --env-file .env -f infra/docker-compose.yml start

Verify readiness and artifact downloads before upgrading. --dry-run prints the plan; without --archive, the script uses tmp/backups/latest.txt or the directory selected by RUNDIAL_BACKUP_DIR.

Upgrade ​

For a source checkout:

  1. Back up and keep .env:

    bash
    bash scripts/ops/backup.sh
  2. Update the checkout and start the new version:

    bash
    git pull
    bash scripts/setup/open_core_up.sh
  3. Check the services, a known run and an artifact download before reconnecting writers:

    bash
    docker compose --env-file .env -f infra/docker-compose.yml ps

Retention and logs ​

Set CLICKHOUSE_LOGS_RETENTION_DAYS, CLICKHOUSE_TRACES_RETENTION_DAYS or CLICKHOUSE_EVALS_RETENTION_DAYS to a positive number of days to delete older data. 0 keeps all data on a new installation; changing an existing setting to 0 does not remove its deletion policy. Set AUDIT_EVENT_RETENTION_DAYS to a positive number to prune audit events, or 0 to retain them. Restart the API after changing settings.

Use docker compose --env-file .env -f infra/docker-compose.yml logs --tail=100 to inspect service logs. Add a service name such as api to narrow the output.

Next steps ​