Given two ZFS pools where snapshots from one are sent to the other, is it possible to automatically repair a damaged snapshot using a copy of that snapshot stored on the other pool?
I'm hoping this will only ever be a hypothetical question, but it seems worth knowing! As far as I can tell zfs scrub
only works for a single pool, and only repairs if there is redundancy in that one pool; I guess what I'm looking for is some way to compare two snapshots and repair a damaged one using the other (assuming the other is intact).
For example, if I were to have a ZFS setup limited to a single disk and where space may limit the ability to use the copies
option for self-healing of all data, like on a laptop. In such a case ZFS is still nice to have for its other features (native compression and encryption, corruption detection, and the speed of backups using zfs send
), however, a single flipped bit could cause corruption in a file. While in such a trivial case I could just replace the one file, I'm still curious whether a snapshot could be used for a more complex case (e.g- if some piece of metadata were corrupted, or a specific file can't be identified).