Bad snapshot choices, but what's correct?

rlpowell

Dabbler
Joined
Oct 6, 2022
Messages
25
I am a fairly new TrueNAS SCALE user, but experienced with Linux and Docker.

I have a single dataset pool, main. Under it are my main SMB/NFS share (cleverly titled "share"), haos (a volume, not an FS, used as the drive for a VM), and ix-applications.

I'm a big fan of backups, so I set up automated snapshots of main, and I set them to recursive.

I gather that's bad? Not supposed to backup ix-applications?

My question is, what *should* I be backing up? Just main? Main and haos? There's also this .system thing, apparently?

Here's one day of snapshots, not including the huge pile of main/ix-applications/docker/... stuff:

root@truenas[~]# grep 2023-03-17 /tmp/snapshots | sed 's;/docker/.*;/docker/...;' | uniq main@auto-2023-03-17_00-00 main/.system@auto-2023-03-17_00-00 main/.system/configs-c8c2ac65efb5423aa839beddcf09baf6@auto-2023-03-17_00-00 main/.system/cores@auto-2023-03-17_00-00 main/.system/ctdb_shared_vol@auto-2023-03-17_00-00 main/.system/glusterd@auto-2023-03-17_00-00 main/.system/rrd-c8c2ac65efb5423aa839beddcf09baf6@auto-2023-03-17_00-00 main/.system/samba4@auto-2023-03-17_00-00 main/.system/services@auto-2023-03-17_00-00 main/.system/syslog-c8c2ac65efb5423aa839beddcf09baf6@auto-2023-03-17_00-00 main/.system/webui@auto-2023-03-17_00-00 main/haos@auto-2023-03-17_00-00 main/ix-applications@auto-2023-03-17_00-00 main/ix-applications/catalogs@auto-2023-03-17_00-00 main/ix-applications/default_volumes@auto-2023-03-17_00-00 main/ix-applications/docker@auto-2023-03-17_00-00 main/ix-applications/docker/... main/ix-applications/k3s@auto-2023-03-17_00-00 main/ix-applications/k3s/kubelet@auto-2023-03-17_00-00 main/ix-applications/releases@auto-2023-03-17_00-00 main/ix-applications/releases/plex@auto-2023-03-17_00-00 main/ix-applications/releases/plex/charts@auto-2023-03-17_00-00 main/ix-applications/releases/plex/volumes@auto-2023-03-17_00-00 main/ix-applications/releases/plex/volumes/ix_volumes@auto-2023-03-17_00-00 main/ix-applications/releases/plex/volumes/ix_volumes/ix-plex_data@auto-2023-03-17_00-00 main/ix-applications/releases/plex/volumes/ix_volumes/ix-plex_transcode@auto-2023-03-17_00-00 main/share@auto-2023-03-17_00-00
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Note that ZFS snapshots are not backups. They can appear that way, but having separate backup scheme would be recommended for all important data.

I would normally setup snapshots on the child dataset(s), like your "main/share" separately. Thus, I can control the amount, when taken and duration kept.

For example, on my Linux desktop which uses ZFS, I snapshot my home dataset for recovery purposes. The first set is a rolling 24 hour set, removing the old one, to create the current hour snapshot. This gives me 24 hourly snapshots. Then, another set taken hourly, but over-written until 11pm, which is then kept 1 week for day of week snapshots. (The screwyness for the day of week accounts for power downs, like a laptop might do.)

I could add a day of month one, but it turns out I rarely need the existing ones.


One note, it is generally suggested to create different datasets for different uses. For example, I have a separate "home" and "Media" datasets. Not saying that is the case for you, just pointing out that this also allows different ZFS dataset attributes for them, like no compression on my Media dataset. (Though I do use compression, since it's harmless... just an example.)
 
Top