Commit graph

3 commits

Author SHA1 Message Date
dlawler489
9e92be8407 Pin the data paths in compose, and find the files via the container
A stack manager that deploys from its own directory resolved ./data to an
empty folder, so Postgres initialised a blank database and the install
looked wiped. The compose defaults are absolute now, and survive a sync
that deletes an untracked .env.

The backup script asks the running container where /app/uploads comes from
rather than trusting a setting, refuses to mirror an empty folder, and
won't write a dump of an empty library over backups that have one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 16:59:13 +10:00
dlawler489
217671a5ef Read .env settings tolerantly, and check the files folder first
The backup script missed DATA_DIR when the line carried an export prefix,
quotes, padding or a CR, and silently fell back to ./data — dumping first
and only then discovering there was nothing to mirror. It now strips all
that, prints the paths it's using, and stops before writing anything if
the files folder isn't there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 16:49:33 +10:00
dlawler489
a5bb4dc33d Add a nightly backup script
A dated pg_dump plus an rsync mirror of the model files, with the stack
running. The dump is read back with pg_restore -l inside the container
before it replaces the day's file, so a bad run leaves older backups
alone. Older dumps are pruned after KEEP_DAYS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 16:19:21 +10:00