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:
@@ -27,8 +27,8 @@ Usage:
|
||||
|
||||
Commands:
|
||||
install First-time install: links binary, seeds config, schedules sync.
|
||||
sync Run a backup: brew bundle dump + mackup link install → cloud.
|
||||
restore [Brewfile] Restore a machine: brew bundle + mackup link + macOS defaults.
|
||||
sync Run a backup: brew bundle dump + mackup backup → cloud.
|
||||
restore [Brewfile] Restore a machine: brew bundle + mackup restore + macOS defaults.
|
||||
update [--dry-run] Pull latest ssr code, refresh launchd if needed.
|
||||
schedule on|off Enable/disable the scheduled launchd sync job.
|
||||
config show|edit Print or edit the active config file.
|
||||
|
||||
+9
-9
@@ -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; }
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# ssr-sync — back up Homebrew + Mackup state to the configured cloud dir.
|
||||
# ssr-sync — back up Homebrew + Mackup state to the configured cloud dir (copy-based mackup backup).
|
||||
|
||||
set -euo pipefail
|
||||
SSR_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
|
||||
Reference in New Issue
Block a user