mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-05 17:28:21 +00:00
fix(backup): carry hard links, ACLs and xattrs on every backup and recover hop
baudolo 7.1.x writes volume generations with `rsync -aHAX`, so the producing host keeps `user.*` extended attributes (OpenCloud keeps its storage metadata in `user.oc.*`). Every later copy dropped them again, because none of the other rsync calls passed `-X` (nor `-A`/`-H`): - NFS export snapshots (svc-bkp-nfs-2-local `script.sh`), - the backup host's pull (svc-bkp-remote-2-local `pull_specific_host.py`), - the device sync (svc-bkp-local-2-device `script.py`), - every recover into a live target (`utils/recovery/base.py`, used by the volume, NFS and device recover scripts), - the `recover full` and `recover remote` tree pulls. A disaster recovery through the documented chain therefore restored OpenCloud without `user.oc.*`, silently: the copies succeeded and the dirval stamp does not cover attributes. All of these now run `rsync -aHAX` (`-aHAXP` for the device sync). A target filesystem without xattr support makes rsync exit non-zero as soon as a source file carries attributes, so the hop fails loudly instead of dropping them; there is no per-device opt-out. The single-image pull in `recover remote` keeps `-a`. The provider's ssh-wrapper needs no change: its glob accepts any server flags and its character guard allows them. Two tests write a `user.oc.id` attribute and assert it survives the NFS snapshot and the recover; with the old `-a` both fail with `OSError: [Errno 61] No data available`. Closes #1021 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
fddaecb5ea
commit
21eba1e88f
17 files changed
+37
-19
No files matched your search
@@ -74,7 +74,7 @@ class PullCmdTest(unittest.TestCase):
|
||||
full._pull_cmd("user@srchost"),
|
||||
[
|
||||
"rsync",
|
||||
"-a",
|
||||
"-aHAX",
|
||||
f"user@srchost:{paths.BACKUP_ROOT}/",
|
||||
f"{full.PULL_STAGE}/",
|
||||
],
|
||||
@@ -83,7 +83,7 @@ class PullCmdTest(unittest.TestCase):
|
||||
def test_host_with_explicit_path(self):
|
||||
self.assertEqual(
|
||||
full._pull_cmd("host:/custom/root"),
|
||||
["rsync", "-a", "host:/custom/root/", f"{full.PULL_STAGE}/"],
|
||||
["rsync", "-aHAX", "host:/custom/root/", f"{full.PULL_STAGE}/"],
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user