Problem:
I seem to get snapshots which I haven’t asked for, or I have specifically excluded, yet they turn up.
Question:
Are they system-controlled, i.e. OS rather than user controlled, perhaps?
Background:
I set up some tiered snapshots last year as per the video from @Stux and they worked fine. However when I upgraded to EE at Christmas, I realised that one of the directories no longer existed (/mnt/mainraid/ix-applications is deprected and now, in EE, it is instead at /mnt/ix-apps) and I reconfigured the snapshots thus:
This means that everything in mainraid (“photos”, “videos”, “documents” etc.) is included whereas the listed stuff is excluded. Here are some of the datasets, for example:
where is TN getting the need to snapshot the deciding to include /mainraid/ix-apps/* from?
Do I fix it by excluding this (non-existent) directory? There are also (not shown) a load of mainraid/.system snapshots and again, that is a non existent directory. I have manually deleted most of these now:
Why do you think it’s a non-existent directory. That’s a dataset. Datasets can be mounted at different paths. Look at /proc/self/mountinfo and see where the filesystem is mounted. Typically the system dataset .system is mounted in /var/db/system. I suggest reading the manpage 7 on zfsconcepts and other ZFS-related documentation.
Yes, if you don’t want to include that dataset in your snapshot task, you need to add mainraid/ix-apps as a path to exclude on the task you screenshotted. The ix-apps dataset will be linked to whatever pool you set for the app dataset.
For snapshots already taken of it, you can just search for all snapshots with ix-apps in their name and mass-delete them in the GUI.
If you want to access the ix-apps dataset from the system shell, you can find it in this directory: /mnt/.ix-apps
Hence I can see that the /mnt/.ix-apps dataset is mounted at mainraid/ix-apps. I have made sure that things I don’t want are now excluded and I have manually deleted the things I don’t want
However - am I now excluding datasets which I should allow the system to automatically include - am I creating trouble for myself?
I presume that any “system” controlled snapshots (is there such a thing?) are hidden from the user such that they don’t turn up in the UI.
The exclusions you made only apply to that snapshot task. It will just skip over the excluded datasets. It doesn’t apply to other snapshot tasks.
So any other snapshot task that takes place on your NAS will still be able to capture any of the excluded datasets from this task.
I’m assuming that you’re referring to things like the automatic snapshots when you update an app from the community catalogue (with the snapshot being of ix-apps). Those will still happen and you will see them just fine in the snapshot GUI section of Truenas once searched for.
Only other thing I can think of that this will affect you on are replication tasks.
You’ll need to exclude the same datasets from a replication task if you choose to replicate using the mainraid snapshot task you created.
Thanks very much everyone for this detailed information. I now understand enough to be confident that I have done things right and I know I have some reading to do over the weekend. Thanks all!