Add a script to dump the DB in the volume dir so DB dumps can be backed
up alongside data files, like the gitea profile.
The DB is much bigger than gitea's (~216 MB of SQL): the dump runs every
4 hours and the last 24 hours are kept. The dump is plain SQL, not
gzipped, so that restic deduplicates between dumps: measured, a gzipped
dump adds ~67 MB to the repository each time, a plain one ~5 MB.
The dump goes through a pipe: the snap's AppArmor profile prevents
nextcloud.mysqldump from writing to a redirected file. --single-transaction
gives a consistent dump without locking the tables.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018inUJhddwLWVwYhGB8t6RP
- volume-gitea-data / volume-nextcloud-data: data volume mounted in the
application instance (daily snapshots are configured on the volume)
- volume-gitea-data-ro / volume-nextcloud-data-ro: same volumes mounted
read-only under /backup for the backup instance (restic + backrest),
which must be unprivileged to share the volumes idmap
- app-gitea / app-nextcloud: only install the application, the volume
now comes from the volume-* profile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018inUJksoKAfKRWoSo1tvv6