Operate
Backups
What to back up, and how to restore it.
Back up the database, the two Garage volumes and .env, and keep the copies off the server.
Encryption at rest shows how to encrypt them in the same pipeline.
# Database
docker compose exec -T db pg_dump -U bouee -Fc bouee > bouee-$(date +%F).dump
# Attachments: stop storage for a consistent copy of Garage's metadata
docker compose stop storage
docker run --rm -v bouee_garage-meta:/meta:ro -v bouee_garage-data:/data:ro -v "$PWD":/backup alpine \
tar -C / -czf /backup/garage-$(date +%F).tar.gz meta data
docker compose start storageTo restore, stop the web container and storage first:
docker compose --profile app stop web storage
docker compose exec -T db pg_restore -U bouee -d bouee --clean --if-exists < bouee-2026-01-31.dump
docker run --rm -v bouee_garage-meta:/meta -v bouee_garage-data:/data -v "$PWD":/backup alpine \
sh -c 'rm -rf /meta/* /data/* && tar -C / -xzf /backup/garage-2026-01-31.tar.gz'
docker compose --profile app up -dRestore with the same BETTER_AUTH_SECRET and SECRET_ENCRYPTION_KEY (and S3_SSE_CUSTOMER_KEY if you use
it); without them the stored credentials, or the attachments, cannot be read. Rehearse a restore before you
need one.