Backups
Settings → Backups (admin only) copies the database to a destination directory on the server — on demand or on a schedule (15 minutes to a week) — with an automatic retention period that deletes backups older than the chosen number of days.
In a container, set the backup folder to /app/backups and mount that path on its own volume so backups survive container recreation:
volumes: - galene_data:/app/data - galene_backups:/app/backups # uncomment in docker-compose.ymlThen in the UI: Settings → Backups → Folder → /app/backups → Save folder. (The compose file ships with the backups volume commented out — see Docker & Compose for the full setup.)
Backups are full copies of the database file, so they contain every user’s data. Connection credentials and other stored secrets in that file are encrypted when GALENE_SECRET_KEY is set. Keep the backups volume private, and copy it off-box if you want redundancy beyond the host. Keep the key with your other host secrets, not only inside the backup.
Restore
Section titled “Restore”Stop the app, replace galene.db (and its -wal / -shm files, if you copy those too) with the backup, and start the app again with the same GALENE_SECRET_KEY that was set when the backup was taken.
- With that key, the app opens the file and reads the stored secrets.
- Without the key, or with a different key, the process exits before it listens. The message says
GALENE_SECRET_KEYis missing or cannot decrypt stored credentials. It does not include the stored values.GET /healthis not served. - A backup from a server that never set a key has no encrypted rows. The app starts without a key and logs one warning.
Rotating the key, and the envelope format, are in Environment variables. Take a backup before rotating, and keep the previous key until the new one has started cleanly.
Before upgrading
Section titled “Before upgrading”Take a backup (or confirm scheduled backups are current) before pulling a new app image that may run database migrations. Migrations are automatic at startup; a pre-upgrade copy is the recovery path if something goes wrong.
If category links disappeared after an upgrade
Section titled “If category links disappeared after an upgrade”A bad schema rebuild (fixed in #20) could null transactions.category_id and cascade-delete splits, budgets, and rules while leaving category rows intact.
Galene does not invent a silent reattach. Recovery:
- Stop the app.
- Restore the database file from a Settings → Backups copy taken before that upgrade (replace
galene.db/ the data volume DB with the backup file — see your host’s volume layout in Docker & Compose or From source). - Start the app on a build that includes the #20 migration fix, then upgrade again.
If you only have a post-wipe database, restore from the pre-upgrade backup; do not expect an in-app “guess” repair.