fix(mackup): update backup path and enhance configuration handling

- Corrected the backup path in the `_in_backup` function to reflect the new structure under `mackup/`.
- Improved error handling in `ssr::mackup::configure` to skip restore if the configuration file is not updated, providing user feedback.
- Updated `ssr::sync` to conditionally execute backup based on configuration validity, enhancing robustness.
- Revised documentation in configuration examples to clarify the new Mackup directory structure and its implications for users.
This commit is contained in:
2026-05-13 20:17:50 +02:00
parent 507380eb88
commit 421b802467
8 changed files with 165 additions and 23 deletions
+6 -4
View File
@@ -47,12 +47,14 @@ ssr::cloud::backup_dir() {
printf '%s/%s/%s - %s\n' "$cloud" "$subdir" "$host" "$uuid"
}
# Mackup data lives at the cloud root in a fixed folder. Mackup itself
# resolves its engine via ~/.mackup.cfg which the install routine seeds.
# Parent directory for Mackup file_system storage: same cloud subfolder as
# per-host backups (SSR_BACKUP_SUBDIR). ~/.mackup.cfg sets path=<this> and
# directory=mackup — Mackup places files under <this>/mackup/ (not SSR-controlled).
ssr::cloud::mackup_dir() {
local cloud
local cloud subdir
cloud="$(ssr::cloud::resolve_dir)"
printf '%s/%s\n' "$cloud" "${SSR_MACKUP_SUBDIR:-Mackup}"
subdir="${SSR_BACKUP_SUBDIR:-BACKUP}"
printf '%s/%s\n' "$cloud" "$subdir"
}
ssr::cloud::ensure_available() {