Backup artifacts are JSON files with versioned structure.
- file version:
cma-backup-v1 - envelope version:
cma-envelope-v1 - KDF:
Argon2id - AEAD:
XChaCha20-Poly1305
File stores:
- backup manifest (
version,created_at,account_ids) - encrypted account records (
accountmetadata + auth payload bytes)
cma backup prompt nightly
cma backup env:CMA_PASS nightly
cma backup hash:736563726574 /abs/path/nightly.cma.bakRelative names are saved under ~/.config/cma/backups/ (or $XDG_CONFIG_HOME/cma/backups/).
cma restore ... without --all:
- decrypts backup
- inspects account candidates
- prompts for selected accounts
- applies restore for chosen subset
cma restore ... --all restores all candidates in one mutation path.
When imported candidates conflict with existing accounts:
ask
Requires explicit decision per conflict.overwrite
Replaces existing account metadata/payload with incoming data.skip
Keeps existing account and ignores incoming conflict record.rename
Imports incoming account with a generated display name suffix.
Conflict detection order:
- fingerprint
- account id
- display name
- alias overlap
cma tui restore flow includes:
- source + passphrase input
- backup inspection
- selective vs all toggle
- conflict policy selection
- per-conflict decisions when policy is
ask - restore execution through app service