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
The timer was enabled before the snap install, so a first run could fire
while gitea was not installed yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>