From 84977b5322955387cc428f3dedbbf8c1525f356d Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sat, 11 Feb 2023 10:28:19 +0100 Subject: [PATCH] Leave a note about bind mounting --- playbooks/roles/backups/restic/files/restic-batch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbooks/roles/backups/restic/files/restic-batch b/playbooks/roles/backups/restic/files/restic-batch index 14cb20d..8b511f2 100644 --- a/playbooks/roles/backups/restic/files/restic-batch +++ b/playbooks/roles/backups/restic/files/restic-batch @@ -112,6 +112,10 @@ if __name__ == "__main__": # Prepare the ZFS snapshot to backup with restic. # -------------------------------------------------------------------------------------- try: + # Bind mounting will preserve the device ID of the snapshot mount. This device ID is + # different for every snapshot causing trouble for restic which keeps track of + # device IDs. See https://github.com/restic/restic/issues/3041. Cloning does not + # have the same issue as it is a fresh mount. subprocess.run( ["/usr/sbin/zfs", "clone", "-o", f"mountpoint={backup_path}", snapshot, "rpool/restic"],