feat: add backupbot v2 backup labels (admin sqlite /data + imap mail /mail) #3

Open
autonomic-bot wants to merge 1 commits from add-backupbot-labels into main

Summary

Adds backupbot.backup v2 labels to the admin and imap services so mailu participates in the Co-op Cloud backup/restore lifecycle.

Data-layout justification

Mailu stores its durable state in two volumes:

  • admin service → mailu:/data (/data in the container): SQLite DB (main.db) holding all users, mailboxes, domains, aliases, DKIM config, and application settings. Loss = all accounts gone. Backed up.
  • imap service (Dovecot) → mail:/mail (/mail in 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>") under deploy.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.523.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.py seeds a test mailbox (citest@<domain>) before backup and deletes it before restore; test_backup.py / test_restore.py assert presence/return via flask mailu config-export.

## Summary Adds `backupbot.backup` v2 labels to the `admin` and `imap` services so mailu participates in the Co-op Cloud backup/restore lifecycle. ## Data-layout justification Mailu stores its durable state in two volumes: - **`admin` service → `mailu:/data`** (`/data` in the container): SQLite DB (`main.db`) holding all users, mailboxes, domains, aliases, DKIM config, and application settings. Loss = all accounts gone. **Backed up.** - **`imap` service (Dovecot) → `mail:/mail`** (`/mail` in 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>"`) under `deploy.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.py` seeds a test mailbox (`citest@<domain>`) before backup and deletes it before restore; `test_backup.py` / `test_restore.py` assert presence/return via `flask mailu config-export`.
autonomic-bot added 1 commit 2026-06-11 18:45:07 +00:00
Author
Owner

!testme

!testme
Author
Owner

🌻 cc-cimailu @ edc0201a failure

cc-ci result card

level

full logs · dashboard

<!-- cc-ci:testme --> 🌻 **cc-ci** — `mailu` @ `edc0201a` ❌ **failure** [![cc-ci result card](https://ci.commoninternet.net/runs/470/summary.png)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/470) [![level](https://ci.commoninternet.net/runs/470/badge.svg)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/470) [full logs](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/470) · [dashboard](https://ci.commoninternet.net/)
Author
Owner

!testme

!testme
Author
Owner

🌻 cc-cimailu @ edc0201a passed

cc-ci result card

level

full logs · dashboard

<!-- cc-ci:testme --> 🌻 **cc-ci** — `mailu` @ `edc0201a` ✅ **passed** [![cc-ci result card](https://ci.commoninternet.net/runs/473/summary.png)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/473) [![level](https://ci.commoninternet.net/runs/473/badge.svg)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/473) [full logs](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/473) · [dashboard](https://ci.commoninternet.net/)
Author
Owner

!testme

!testme
Author
Owner

🌻 cc-cimailu @ edc0201a passed

cc-ci result card

level

full logs · dashboard

<!-- cc-ci:testme --> 🌻 **cc-ci** — `mailu` @ `edc0201a` ✅ **passed** [![cc-ci result card](https://ci.commoninternet.net/runs/477/summary.png)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/477) [![level](https://ci.commoninternet.net/runs/477/badge.svg)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/477) [full logs](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/477) · [dashboard](https://ci.commoninternet.net/)
Author
Owner

!testme

!testme
Author
Owner

🌻 cc-cimailu @ edc0201a passed

cc-ci result card

level

full logs · dashboard

<!-- cc-ci:testme --> 🌻 **cc-ci** — `mailu` @ `edc0201a` ✅ **passed** [![cc-ci result card](https://ci.commoninternet.net/runs/483/summary.png)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/483) [![level](https://ci.commoninternet.net/runs/483/badge.svg)](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/483) [full logs](https://drone.ci.commoninternet.net/recipe-maintainers/cc-ci/483) · [dashboard](https://ci.commoninternet.net/)
All checks were successful
cc-ci/testme cc-ci: success
This pull request has changes conflicting with the target branch.
  • compose.yml
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin add-backupbot-labels:add-backupbot-labels
git checkout add-backupbot-labels
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: recipe-maintainers/mailu#3
No description provided.