Date: Tue, 20 Sep 2022 19:36:53 +0000 From: "Dave Cottlehuber" <dch@skunkwerks.at> To: questions@freebsd.org, "Julien Cigar" <julien@perdition.city> Subject: Re: zfs replication tool Message-ID: <ee3cc42b-b80d-4115-afe0-817d0dc3388a@www.fastmail.com> In-Reply-To: <20220916133046.znfelln3fisrjnuz@x1> References: <20220916133046.znfelln3fisrjnuz@x1>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ee3cc42b-b80d-4115-afe0-817d0dc3388a>