Old config db from system dataset snapshots

myoung

Explorer
Joined
Mar 14, 2018
Messages
70
I have a freenas machine whose boot USB failed. I've reinstalled freenas on a SATA DOM and imported to pool into the new installation. How do I get the old system configuration out of the .system dataset snapshots to upload into the new installation?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

myoung

Explorer
Joined
Mar 14, 2018
Messages
70
I have two config directories, I assume one is for the old installation and one is for the new. Both are empty.
Code:
root@freenas:~ # ll -a /var/db/system/configs-b54c927c46164d20b01735720beb7291/
total 20
drwxr-xr-x   2 root  wheel   2 May  2 10:42 ./
drwxr-xr-x  10 root  wheel  12 May  2 11:39 ../
root@freenas:~ # ll -a /var/db/system/configs-d6d294a404024d4b9f621e6bf1afa53c/
total 20
drwxr-xr-x   2 root  wheel   2 Sep 21  2017 ./
drwxr-xr-x  10 root  wheel  12 May  2 11:39 ../


However, zfs list shows the dataset isn't empty.
Code:
pool0                                                   34.6T  61.7T   219K  /mnt/pool0
pool0/.system                                           2.10G  61.7T  62.2M  legacy
pool0/.system/configs-b54c927c46164d20b01735720beb7291   201K  61.7T   201K  legacy
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c  90.7M  61.7T  88.9M  legacy


Also see snapshots of the old installation config which reference some data.
Code:
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190415.0200-2w   183K      -  87.1M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190416.0200-2w   183K      -  87.2M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190417.0200-2w   183K      -  87.4M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190418.0200-2w   183K      -  87.5M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190419.0200-2w   183K      -  87.7M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190422.0200-2w   183K      -  88.1M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190423.0200-2w   183K      -  88.3M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190424.0200-2w   183K      -  88.4M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190425.0200-2w   183K      -  88.6M  -
pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190426.0200-2w   183K      -  88.7M  -
 

myoung

Explorer
Joined
Mar 14, 2018
Messages
70
Hopefully someone can reach out and let me know whether this is "best practice," but I mounted the snapshot in tmp and and can see the configs now.

Code:
root@freenas:~ # mkdir /tmp/configs
root@freenas:~ # mount -t zfs pool0/.system/configs-d6d294a404024d4b9f621e6bf1afa53c@auto-20190426.0200-2w /tmp/configs
root@freenas:~ # ll /tmp/configs/
total 37
drwxr-xr-x  2 root  wheel  583 Apr 25 01:45 FreeNAS-11.0-U3 (c5dcf4416)/
root@freenas:~ # ll /tmp/configs/FreeNAS-11.0-U3\ \(c5dcf4416\)/
total 90636
-rw-r-----  1 root  wheel  897024 Sep 22  2017 20170922.db
-rw-r-----  1 root  wheel  897024 Sep 23  2017 20170923.db
-rw-r-----  1 root  wheel  897024 Sep 24  2017 20170924.db
-rw-r-----  1 root  wheel  897024 Sep 25  2017 20170925.db
-rw-r-----  1 root  wheel  897024 Sep 26  2017 20170926.db
-rw-r-----  1 root  wheel  897024 Sep 27  2017 20170927.db
-rw-r-----  1 root  wheel  897024 Sep 28  2017 20170928.db
-rw-r-----  1 root  wheel  897024 Sep 29  2017 20170929.db
-rw-r-----  1 root  wheel  897024 Sep 30  2017 20170930.db
-rw-r-----  1 root  wheel  897024 Oct  1  2017 20171001.db
-rw-r-----  1 root  wheel  897024 Oct  2  2017 20171002.db
...
 
Top