Backup system dataset

Papid1975

Dabbler
Joined
Jun 29, 2020
Messages
40
I know I can download the TrueNAS config to restore my system. This doesn’t include the whole system though (logs are missing for example).

Is there a way to also backup the system dataset (ideally automatically, for example with a replication task)? I tried to set up a replication task with mypool/.system as the source, but the dataset couldn’t be found, so it seems to be special in some way.
 
Last edited:

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
the dataset is at /var/db/system - that location has the logs in it.

The config file is automatically backed up every day.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I guess if the desire is to directly back up the datasets (zfs list | grep .system), then you could do that with a cron task and zettarepl.
 

Papid1975

Dabbler
Joined
Jun 29, 2020
Messages
40
the dataset is at /var/db/system - that location has the logs in it.

The config file is automatically backed up every day.

Thanks. I’d like to replicate/send the dataset itself (rather than the mounted dataset) to take advantage of blockwise data transfer. If I can’t find a way, I will use rsync to backup /var/db/system.

I guess if the desire is to directly back up the datasets (zfs list | grep .system), then you could do that with a cron task and zettarepl.

Yes! Sorry, I am still quite new to FreeBSD and TrueNAS. Did I get this right? This zettarepl is similar to the build-in replication of TrueNAS yet more powerful so it can also replicate the special dataset mypool/.system. When using “Tasks > Replication Tasks” and specifying mypool/.system the UI gives me the error message [EINVAL] periodic_snapshot_create.dataset: ZFS dataset or zvol not found (even though it is listed by zfs list | grep .system). Using any other dataset this way works as intended.

zfs list | grep .system strangely tells me there are .system datasets on almost all my pools (all different) o_O …is it supposed to be like that? It seems TrueNAS created a new system dataset with every pool I added.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
zettarepl is similar to the build-in replication of TrueNAS yet more powerful
Almost... the replication system in the GUI uses zettarepl in the background, so the fact that you have access to the command line of zettarepl means you can do things that the GUI hasn't accounted/allowed for.

zfs list | grep .system strangely tells me there are .system datasets on almost all my pools (all different) o_O …is it supposed to be like that?
I guess only one of them will be current... you can move the system dataset around and it will have moved automatically as soon as you added your first data pool, but after that, I don't think it would have moved automatically, so you might be "sleep administering" or something like that.
 
Last edited:

Papid1975

Dabbler
Joined
Jun 29, 2020
Messages
40
Haha, yeah, sleep administering would explain a lot ;)

Thanks for your help, will have a deeper look into zettarepl.
 
Top