Backing up your database and files

·

SummitPSA has no in-app backup button. Backups are taken at the infrastructure level: a mariadb-dump of the database, plus a copy of your uploaded files. Run these on a schedule and before every update.

1. Dump the database

Run mariadb-dump inside the database container and pipe it to a compressed file. --single-transaction gives a consistent snapshot without locking; --routines and --triggers capture stored routines and triggers:

ts=$(date +%Y%m%d-%H%M%S)
sudo docker compose -f /opt/summitpsa/docker-compose.yml exec -T db \
  sh -c 'exec mariadb-dump -uroot -p"$MARIADB_ROOT_PASSWORD" --single-transaction \
         --routines --triggers "$MARIADB_DATABASE"' \
  | gzip > /opt/summitpsa/backups/db-$ts.sql.gz

The command reads the root password and database name from the container's own environment, so you do not embed secrets in the command line.

2. Back up uploaded files

Attachments, KB images, and branding assets live in the uploads volume on disk. Copy that directory (and your compose file plus .env/.env.docker) alongside the SQL dump so a restore is complete:

sudo tar czf /opt/summitpsa/backups/uploads-$ts.tar.gz \
  -C /opt/summitpsa uploads

What to keep

  • the compressed SQL dump (your database);
  • the uploads archive (your files);
  • your docker-compose.yml and environment files (so you can rebuild the stack).

Store backups off the host and test a restore periodically — an untested backup is not a backup. Always take a fresh dump immediately before any update.

Was this article helpful?
Still need help? Contact SummitPSA support.