refactor(mackup): transition to copy-based backup and restore

- Updated `ssr sync` and `ssr restore` commands to use `mackup backup` and `mackup restore`, replacing the previous symlink-based approach.
- Added guidance for users with legacy symlink setups to run `ssr mackup unlink` for recovery.
- Revised documentation in README, completions, and configuration examples to reflect the new copy-based methodology for improved reliability on newer macOS versions.
- Enhanced comments in the codebase to clarify the changes and their implications for users.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-13 09:17:25 +02:00
parent 51fb589ef2
commit c31338dba9
7 changed files with 47 additions and 91 deletions
+9 -9
View File
@@ -5,8 +5,8 @@
# scan Per-item prompts for new ~/.mackup/ssr-*.cfg files.
# list List existing ~/.mackup/ssr-*.cfg files with the path they cover.
# clean Remove all generated ssr-*.cfg files (prompts first).
# unlink Run `mackup link uninstall` — copy configs back from Mackup
# storage and remove symlinks (fixes broken iTerm / shell paths).
# unlink Run `mackup link uninstall` — only for undoing symlink-based Mackup
# (legacy SSR or manual `mackup link`); copies from storage and removes symlinks.
set -euo pipefail
SSR_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -31,14 +31,14 @@ Subcommands:
scan Suggest new ~/.mackup/ssr-*.cfg files (confirm each item).
list List existing generated files.
clean Remove all generated ssr-*.cfg files.
unlink Revert Mackup symlinks (copy from cloud → real files in ~).
unlink Undo symlink-based Mackup only (`mackup link uninstall`).
Run 'ssr mackup scan' when new dot-dirs appear; commit ~/.mackup/ssr-*.cfg
with your dotfiles if you use them.
If Terminal/iTerm or other apps break after sync, run:
If you previously used symlink-based Mackup and apps break, run:
ssr mackup unlink
That runs Mackup's official undo for symlink-based installs.
Current SSR uses copy-based `mackup backup` / `restore` instead.
EOF
}
@@ -259,11 +259,11 @@ cmd_unlink() {
This runs: mackup -f link uninstall
Mackup copies each managed path from your Mackup storage folder back into
$HOME and removes the symlinks. Use when settings broke after `ssr sync` /
`mackup link install` (e.g. iTerm2, shell init files pointing at iCloud).
$HOME and removes the symlinks. Use only if you still have symlink-based
Mackup from an older SSR or from manual `mackup link` / `link install`.
After unlink, apps use normal local files again. Run `ssr sync` only when
you are ready to re-apply symlink-based backup.
After unlink, apps use normal local files again. Ongoing `ssr sync` uses
`mackup backup` (copy to cloud), not symlinks.
EOF
printf '\n'
ssr::confirm "Run mackup link uninstall now?" 120 || { printf 'Aborted.\n'; return 0; }