Thanks for following up! Here is my current generated configuration for reference: https://gist.github.com/mdlayher/36c201634be0e2b9593f266e0eb777ec
So, you are pushing a set of filesystems from primary to secondary/local. And then, from secondary/local, to yet another cold backup pool?
I would like to replicate primary to secondary, but since I only have a single client (the local host) I just set client_identity = local, so yep the computed path ends up being primary/media to secondary/local/primary/media.
I have two single disk pools called backup0 and backup1 and replicate directly from primary to those when the pools are imported and online. These are cold storage disks that I will plug in, replicate, and then probably take offsite or store in a safe.
Regardless of the previous question: would you want primary's content to be replicated to secondary as well, then? Or are you not interested in replicating primary, but only its children?
(Because: primary is not just the pool name, it's also a regular dataset, that could contain user data).
I'm only interested in replicating the children, yes! I've generally been treating non-leaf datasets as just containers for other datasets.
After thinking on this for a couple of days, it is a bit nice to have the secondary/local prefix because I can only set ZFS encryption on a child dataset rather than the entire zpool. This means that I can guarantee everything written in under that child is encrypted, and if I understand correctly, should also simplify unlocking the backup{0,1} pools using ZFS native encryption.
So really there are no necessary changes here since no software I am using demands a particular layout in my backup pools. I just wanted to share my initial thoughts.