Can't find automatic config backups

MikeHartman

Cadet
Joined
May 21, 2018
Messages
4
I'm recovering myTrueNAS-12.0-U4 system and the last manual backup of the config isn't quite as fresh as I'd like. My understanding is that the config should be automatically backed up under /var/db/system/ daily.

I did a fresh install, reimported all my pools, double-checked them all, and only one has a .system dataset:
Code:
zfs list | grep system

Performance/.system                                            892M   344G      785M  legacy
Performance/.system/configs-21d7f87fdd8f4e01985f762f0bac7f0d    96K   344G       96K  legacy
Performance/.system/configs-76c11d7f8a944b3d8e42fe35420dbaa3  16.3M   344G     16.3M  legacy
Performance/.system/cores                                       88K  1024M       88K  legacy
Performance/.system/rrd-21d7f87fdd8f4e01985f762f0bac7f0d      15.6M   344G     15.6M  legacy
Performance/.system/rrd-76c11d7f8a944b3d8e42fe35420dbaa3      70.7M   344G     70.7M  legacy
Performance/.system/samba4                                     552K   344G      376K  legacy
Performance/.system/services                                    96K   344G       96K  legacy
Performance/.system/syslog-21d7f87fdd8f4e01985f762f0bac7f0d    180K   344G      180K  legacy
Performance/.system/syslog-76c11d7f8a944b3d8e42fe35420dbaa3   3.05M   344G     3.05M  legacy
Performance/.system/webui                                       88K   344G       88K  legacy


That seems to be mounted correctly at /var/db/system/:

Code:
mount | grep system

Performance/.system on /var/db/system (zfs, local, nfsv4acls)
Performance/.system/cores on /var/db/system/cores (zfs, local, nfsv4acls)
Performance/.system/samba4 on /var/db/system/samba4 (zfs, local, nfsv4acls)
Performance/.system/syslog-21d7f87fdd8f4e01985f762f0bac7f0d on /var/db/system/syslog-21d7f87fdd8f4e01985f762f0bac7f0d (zfs, local, nfsv4acls)
Performance/.system/rrd-21d7f87fdd8f4e01985f762f0bac7f0d on /var/db/system/rrd-21d7f87fdd8f4e01985f762f0bac7f0d (zfs, local, nfsv4acls)
Performance/.system/configs-21d7f87fdd8f4e01985f762f0bac7f0d on /var/db/system/configs-21d7f87fdd8f4e01985f762f0bac7f0d (zfs, local, nfsv4acls)
Performance/.system/webui on /var/db/system/webui (zfs, local, nfsv4acls)
Performance/.system/services on /var/db/system/services (zfs, local, nfsv4acls)


There are two configs-* directories there, one with today's date and one dated the day of my previous install:

Code:
ls -lha /var/db/system/

total 48
drwxr-xr-x  13 root  wheel    15B Jan 10 05:16 .
drwxr-xr-x  15 root  wheel   1.4K Jan 10 05:00 ..
drwxr-xr-x   2 root  wheel     2B Jan 10 04:52 configs-21d7f87fdd8f4e01985f762f0bac7f0d
drwxrwxrwx   2 root  wheel     2B Jun 16  2021 configs-76c11d7f8a944b3d8e42fe35420dbaa3
drwxrwxr-x   2 root  wheel     2B Jan 10 05:00 cores
-rw-------   1 root  wheel     0B Jun 16  2021 nfs-stablerestart
-rw-------   1 root  wheel     0B Jun 16  2021 nfs-stablerestart.bak
drwxr-xr-x   3 root  wheel     4B Jan 10 05:33 rrd-21d7f87fdd8f4e01985f762f0bac7f0d
drwxrwxrwx   2 root  wheel     2B Jun 16  2021 rrd-76c11d7f8a944b3d8e42fe35420dbaa3
drwxr-xr-x   4 root  wheel    14B Jan 10 04:52 samba4
drwxr-xr-x   2 root  wheel     2B Jan 10 04:52 services
drwxr-xr-x   3 root  wheel     3B Jan 10 04:52 syslog-21d7f87fdd8f4e01985f762f0bac7f0d
drwxrwxrwx   2 root  wheel     2B Jun 16  2021 syslog-76c11d7f8a944b3d8e42fe35420dbaa3
drwxr-xr-x   2 root  wheel    10B Jan 10 04:53 update
drwxr-xr-x   2 root  wheel     2B Jan 10 04:52 webui


But both are empty:

Code:
ls -lha /var/db/system/configs-76c11d7f8a944b3d8e42fe35420dbaa3

total 9
drwxrwxrwx   2 root  wheel     2B Jun 16  2021 .
drwxr-xr-x  13 root  wheel    15B Jan 10 05:16 ..

ls -lha /var/db/system/configs-21d7f87fdd8f4e01985f762f0bac7f0d
total 9
drwxr-xr-x   2 root  wheel     2B Jan 10 04:52 .
drwxr-xr-x  13 root  wheel    15B Jan 10 05:16 ..


According to this post each of those directories should have a subdirectory for each version of FreeNAS I've used, and each of those should have a backup config file from every day the system was running at 3:45am. Am I doing something wrong? It doesn't seem like it's ever done any kind of config backup at all.

The only explanation I've come up with is that maybe the .system dataset was actually running on the boot pool that got wiped out, meaning the actual backups were there. But if so I don't know why the Performance/.system dataset would have a configs-* directory dating from the previous install at all. If that dataset was just created as a side-effect of the install today it shouldn't know anything about the previous installation.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
But both are empty:
They're not empty - use the built-in Midnight Commander (mc on the CLI) to navigate to them, open them up, and let you find the .db files inside them.

I find MC much easier to use in an SSH session than in Shell.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
If you have a windows client to manage your FreeNAS box, maybe use WinSCP to access the configuration file you need - easier than mc because of familiarity.
 

MikeHartman

Cadet
Joined
May 21, 2018
Messages
4
They're definitely empty. I don't know why mc would show anything ls -lha wouldn't, but I tried it just to be sure and there's still nothing in there. This is in an SSH session.
 

MikeHartman

Cadet
Joined
May 21, 2018
Messages
4
The annoying thing is I have replication tasks backing up datasets from Performance onto my main storage pool, but apparently that doesn't include .system, so there's no second place to double-check.
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925
Hmmm... sounds like your hypothesis on the boot pool system dataset location may be correct but it's perplexing for sure.
 
Top