Re: zfs replication tool
- In reply to: Julien Cigar : "zfs replication tool"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Sep 2022 19:36:53 UTC
On Fri, 16 Sep 2022, at 13:30, Julien Cigar wrote: > Hello, > > I have the case here where I have to atomically snapshot recursively a > dataset with many children (100+) but exclude a dozen of them. > > There are dozen of ZFS replication tools and I was wondering which ones > supports such case and are recommended? > > It looks like "recursivity" in a lot of tools is handled through "zfs > snapshot -r somepool" whereas ZFS also supports "zfs snapshot > somepool/ds1 somepool/ds2 somepool/ds3/child1" which is also atomic > > Thanks! > > Julien Look at zfs-program(8) to get your atomic snapshot requirements, while still excluding some of them. https://man.freebsd.org/zfs-program "The ZFS channel program interface allows ZFS administrative operations to be run programmatically via a Lua script. The entire script is executed atomically, with no other administrative operations taking effect concurrently. A library of ZFS calls is made available to channel program scripts. Channel programs may only be run with root privileges." https://klarasystems.com/articles/understanding-zfs-channel-programs/ This doesn't help you with your zfs send constraints though, you'll still need to traverse these manually for sending. I'd be interested to know if you can `zfs send pool/foo@bar` when not all datasets under pool/foo have a snapshot @bar... Do let the list know what ended up working out. Blog posts on complex zfs setups are always welcome. A+ Dave