Repository navigation
Conversation
settings.backup backs up /var/vmail (mailboxes and Sieve) and Rspamd's learned data daily to an S3-compatible bucket with restic, with pruning and a 1% data check per run. Credentials and a generated repository password live in the sops secrets (just backup-setup). appendOnly supports object-locked buckets, so a compromised server cannot delete its own backups; pruning then happens from the operator's machine (just backup-prune). docs/backups.md covers setup and restore. Closes #6 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6
Changes
modules/backup.nix(settings.backup), usingservices.restic.backups.mail:/var/vmail(all mailboxes, including Sieve scripts) and/var/lib/redis-rspamd(Rspamd's learned data);keep.daily/weekly/monthly;EnvironmentFile, never the Nix store.backup.appendOnlyfor object-locked / no-delete buckets, so a compromised server can't delete its own backups. The server then never prunes, andjust backup-prunedoes it from the operator's machine with a key that may delete.just backup-setup: prompts for the bucket key and generates the restic password, printed once with instructions to store it elsewhere.just backup-now,just backup-snapshots, andresticin the dev shell.docs/backups.md: setup, protecting backups from the server (B2/S3 object lock or restricted keys), and restore steps.Testing
restic-backups-mail.service: repository,RESTIC_PASSWORD_FILE=/run/secrets/backup/password, the env file from/run/secrets/rendered/, then backup, unlock, forget/prune and check.OnCalendar=daily, and therestic-mailwrapper is installed.🤖 Generated with Claude Code
https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
Generated by Claude Code