Skip to main content

Backup

This document was generated using AI assistance

Content may include inaccuracies, outdated information, or technical errors. Users are advised to cross-check critical information before implementation.

A backup of an Architeezy installation is a dump of its two databases plus the file that holds their secrets. This page lists what has to be kept and the commands that dump and restore it.

Stored data

Everything worth keeping is stored in two PostgreSQL databases:

  • architeezy, in the db container, on the architeezy-db-data volume. Scopes, projects, models, representations, project membership, and the images uploaded into projects. Images are stored as rows, not as files, so there is no separate upload directory to copy.
  • keycloak, in the keycloak-db container, on the architeezy-keycloak-db-data volume. User accounts, credentials, the realm and its clients, including the client secret.

Two more things are worth keeping alongside them:

  • The .env file, which carries the secrets the databases were created with. A keycloak dump is of little use without the client secret that matches it.
  • Any change you made to docker-compose.yml or to the reverse proxy configuration.

Redis holds sessions only. Losing it signs everyone out and costs nothing else, so it does not need a backup.

Taking a backup

Load the .env file so the database user names are available, then dump both databases while the stack is running:

set -a && . ./.env && set +a
docker compose exec -T db \
pg_dump -U "$DATABASE_USERNAME" -Fc architeezy > architeezy-$(date +%F).dump
docker compose exec -T keycloak-db \
pg_dump -U "$KEYCLOAK_DATABASE_USERNAME" -Fc keycloak > keycloak-$(date +%F).dump

Restore with pg_restore. Stop the backend and api-gateway services first and start them again afterwards:

docker compose exec -T db \
pg_restore -U "$DATABASE_USERNAME" -d architeezy --clean --if-exists < architeezy-<date>.dump

A single project also travels through the interface: choose Download in the project menu, and bring the file back with Upload Project on the start page. That moves one project between installations. It does not replace a database dump, which captures membership and history as well.