Replication tasks - nested vs direct

I’m working on some replications to backup datasets to a dedicated backup pool. The data in question is nextcloud but this isn’t specific to the next cloud app.

My current structure is:

ssdpool
   apps
     nextcloud
      db
      html
datapool
   apps
     nextcloud
      data
backupspool
    apps
      nextcloud
       data
       db
       html

I have 2 replication tasks:

1 - Replicates both /mnt/ssdpool/apps/nextcloud/db and /mnt/ssdpool/apps/nextcloud/html to /mnt/backuppool/apps/nextcloud/

2 - Replicates /mnt/datapool/apps/nextcloud/data to /mnt/backuppool/apps/nextcloud/

The problem I have is they behave differently. Replication number 1 will copy the datasets selected to identical ones underneath the “nextcloud” dataset on the backup pool. This is what I expect to happen.
Replication number 2 however, will copy the contents of the data dataset directly into the nextcloud dataset, it doesn’t create the new dataset as a child. This completely breaks the directory structure.

My questions are - why is the behaviour different, and how do I override it so that it works consistently?

Also as an aside, for the love of everything can we please change it so that removing a dataset doesn’t delete every single sync job associated with it, i’m tired of having to recreate every single replication job just because zfs replication fucked up the datasets

1 Like

Within the replication wizard once you have selected the destination /mnt/backuppool/apps/nextcloud/ simply type the name of the new dataset after the path like this /mnt/backuppool/apps/nextcloud/somenewdataset and it will auto create the new dataset for the replication to land.

1 Like

Not sure I understand this.

It depends if you have one dataset, or multiple selected.

With multiple, the datasets are replicated into the destination dataset.

With a single, the contents are.

Yes…. I don’t think its ideal. Rsync solves a similar problem by allowing the destination to have a trailing /