For the complete documentation index, see llms.txt. This page is also available as Markdown.

Backing Up the Connectware Database

Create and restore a logical backup of the Connectware PostgreSQL database on Kubernetes and Docker.

Connectware stores its configuration, users, and service state in a PostgreSQL database. This guide shows how to create, verify, and restore a database backup on both Kubernetes and Docker.

Run this procedure before upgrading Connectware, before applying destructive maintenance, or on a regular schedule.

Prerequisites

  • Sufficient local disk space to hold the SQL dump. The database is usually small, but depending on how you use Connectware it can grow to multiple gigabytes.

  • The PostgreSQL container is running and ready.

  • kubectl access to the namespace in which Connectware is installed.

  • The postgresql-0 pod is Running and Ready.

Creating a Backup

Dump the cybus_connectware database to a local file using the command for your platform.

Replace ${NAMESPACE} with your Connectware namespace.

kubectl exec -n ${NAMESPACE} postgresql-0 -- \
    bash -c "pg_dump -U cybus-admin --if-exists -c cybus_connectware" \
    > connectware_database.sql

The resulting connectware_database.sql file contains a full logical backup with DROP IF EXISTS statements for a clean restore.

Verifying the Backup

Confirm that the dump file is non-empty and ends with -- PostgreSQL database dump complete. The verification command is the same on both platforms:

If the file is empty or the closing line is missing, the backup did not complete. Investigate the PostgreSQL container logs and retry.

Restoring a Backup

Pipe the dump back into psql inside the PostgreSQL container, then restart the Connectware workloads so all services pick up the restored state.

  1. Wait for the postgresql-0 pod to become ready.

  2. Pipe the dump back into psql:

  1. Restart the Connectware workloads so all services pick up the restored state:

Verifying the Restore

Wait for all containers or pods to return to a running and ready state, then sign in to the Admin UI and confirm that your services and users are present.

Scheduling Regular Backups

The backup and verify commands run on demand. To automate backups, wrap the pg_dump invocation in a scheduler appropriate for your platform — for example a Kubernetes CronJob on Kubernetes, or cron / systemd timers on the Docker host — and ship the resulting SQL file to offsite storage.

Last updated

Was this helpful?