Help with Snapshot/Replication and Exclude child datasets

FrankWard

Explorer
Joined
Feb 13, 2023
Messages
71
FYI for anyone else curious... I have a replication task where I have excluded specific child datasets from the parent. It appears that it does not exclude the children of the excluded child datasets, only the datasets specified in the "exclude child dataset" option. I think the tooltip or docs could inform users of this for clarity. It would be nice to have an option to also exclude child datasets of any excluded datasets. I've amended the docs with an idea.

Help: Exclude Child Datasets


Exclude specific child dataset snapshots from the replication. Use with Recursive snapshots. List child dataset names to exclude. Separate entries by pressing Enter. Example: pool1/dataset1/child1. A recursive replication of pool1/dataset1 snapshots includes all child dataset snapshots except child1. Any child datasets of the excluded dataset are not recursively excluded (ie- pool1/dataset/child1/toys) and will continue to replicate unless they too are specified in the excluded datasets.

UPDATE:
Goal:
Exclude folder within a dataset from replication. Not possible?
Result: The 'Exclude Child Datasets' field will accept any existing folder in a dataset, but unless its an actual dataset it will not be excluded.

Let's say I have a snapshot and replication task for /pool/dataset/ixapplications. Inside the ixapplications we have several other folders. I want to exclude a specific folder (releases), so in both snapshot and replication tasks, under I enter '/pool/dataset/ixapplications/releases' into Exclude Child Datasets field. TrueNAS validates and accepts this entry on save. This led me to believe it would work since if you enter a non-existing folder it will not validate and fail with an error. It will also fail if the entry isn't present in both the snapshot and replication tasks. However, this folder is not excluded and is snapshotted regardless.

Has anyone else messed around with this or have any tips?
 
Last edited:

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
er. are you sure?
if this is the case, it is not a matter of the help files, but a bug that should be reported.

excluding the parent should have no need of being recursive, because without the parent, there can be no child; without the parent I don't think there would be anywhere to replicate the child *to* on the destination.
 

FrankWard

Explorer
Joined
Feb 13, 2023
Messages
71
I have setup two TN 23.10.1 systems for testing. I will report my findings here after more investigation.
 

FrankWard

Explorer
Joined
Feb 13, 2023
Messages
71
My two test systems (NAS1 & NAS2) are snapshotting and replicating to each other with no issues. I've created a basic pool and some folders/data.

Code:
NAS1
- TANK (pool)
  - Videos (dataset)
    - Excluded (dataset)
      - Testing (folder)


The replication task has the following in the "exclude child datasets" field: TANK/Videos/Excluded
The snapshot task has the following in the "exclude child datasets" field: TANK/Videos/Excluded
The replication task runs every minute and keeps for 1 hour.

The issue is that the Excluded dataset has not been excluded and is still visible after several hours. Can anyone help me understand why this folder would not be excluded on the target?
 
Top