feat(backup): backup stacklet v1: append-only sync to attached APFS disk#17
Draft
arthware-dev wants to merge 3 commits into
Draft
feat(backup): backup stacklet v1: append-only sync to attached APFS disk#17arthware-dev wants to merge 3 commits into
arthware-dev wants to merge 3 commits into
Conversation
Append-only backup of stacklet data to an attached APFS disk. Photos (Immich originals) and documents (Paperless archived PDFs) sync nightly via cron; every file is locked with the kernel uchg flag once on the vault, so accidents and ransomware cannot reach back through. Stacklet: * host-type stacklet, opt-in via 'stack up backup' * interactive on_configure prompts for disk, encryption, nightly time * on_install plants the canary tripwire, generates an FDA-granted .app wrapper, installs the cron entry * on_stop / on_destroy remove the cron defensively; vault data and the Keychain entry are preserved External-disk engine: * rsync --ignore-existing for append-only writes * chflags uchg on every new file (kernel-enforced immutability) * canary + preflight refuse to sync a wiped source * filesystem probe refuses non-APFS targets at runtime * per-run JSON appended to history.jsonl (append-only audit trail) Orchestrator: * discovers [[backup.archive]] across enabled stacklets * posts summary to #famstack via stacker-bot Reserved for follow-up: [[backup.snapshot]] for DB dumps, 'stack backup restore' + per-stacklet on_restore hooks, encrypted offsite via restic. Tests: 153 unit + 9 E2E against a real APFS sparse image.
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.
Summary
backupstacklet: append-only sync of photos (Immich originals) and documents (Paperless PDFs) to an attached APFS disk. Files are locked with the kerneluchgflag once on the disk, so accidents and ransomware cannot reach back through.stack backup sync/stack backup statusship as the user-facing CLI.stack up backupwalks setup (disk, encryption, nightly time), plants the canary, installs a cron entry, and points the user at the one-time/usr/sbin/cronFull Disk Access grant in System Settings.[[backup.archive]]declared byphotosanddocs. Reserved for follow-up:[[backup.snapshot]]for DB dumps,stack backup restore+ per-stackleton_restorehooks, encrypted offsite via restic.