feat: add backupbot v2 backup labels (admin sqlite /data + imap mail /mail) #3
Reference in New Issue
Block a user
No description provided.
Delete Branch "add-backupbot-labels"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds
backupbot.backupv2 labels to theadminandimapservices so mailu participates in the Co-op Cloud backup/restore lifecycle.Data-layout justification
Mailu stores its durable state in two volumes:
adminservice →mailu:/data(/datain the container): SQLite DB (main.db) holding all users, mailboxes, domains, aliases, DKIM config, and application settings. Loss = all accounts gone. Backed up.imapservice (Dovecot) →mail:/mail(/mailin the container): Maildir message storage — all user messages across all folders. Loss = all mail gone. Backed up.Excluded volumes (intentional)
dkim:/dkim— DKIM signing keys. Loss requires re-keying + DNS TXT update on the mail domain; for CI purposes DKIM regeneration is harmless (no live DNS-side DKIM record in CI). Could be added in a follow-up if DKIM key recovery is wanted.redis:/data— Redis session/rate-limit cache. Transient; safe to lose.rspamd:/var/lib/rspamd— Rspamd training data. Re-learns over time; not durable application state.webmail:/data— Roundcube per-user prefs. Regenerable.mailqueue:/queue— Postfix in-flight queue. Transient.certs:/certs— TLS cert dumps from certdumper. Regenerated from Traefik on restart.Label syntax
Using backupbot v2 map syntax (
backupbot.backup: "true"+backupbot.backup.path: "<path>") underdeploy.labels, as used in keycloak and mattermost-lts recipes. No pre/post-hooks needed — SQLite is safe to copy live (WAL mode; copy is consistent at the page level), and Maildir is file-based (copy-safe live).Version bump
3.0.1+2024.06.52→3.0.2+2024.06.52(patch bump for backup label addition).CI coverage
This PR is tested by the cc-ci harness:
tests/mailu/ops.pyseeds a test mailbox (citest@<domain>) before backup and deletes it before restore;test_backup.py/test_restore.pyassert presence/return viaflask mailu config-export.!testme
🌻 cc-ci —
mailu@edc0201a❌ failurefull logs · dashboard
!testme
🌻 cc-ci —
mailu@edc0201a✅ passedfull logs · dashboard
!testme
🌻 cc-ci —
mailu@edc0201a✅ passedfull logs · dashboard
!testme
🌻 cc-ci —
mailu@edc0201a✅ passedfull logs · dashboard
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.