Is it possible to restore a config manually?

Joined
Jan 4, 2014
Messages
1,644
My TC database is located in a TrueNAS NFS share. If I didn't have access to TC, but still had access to the share, would it still be possible to restore a server config?

I notice the server configs are stored in subdirectories of nas-db-backup e.g...
Code:
root@truenas-l2[...docker/truecommand/data/nas-db-backup]# ls
9ZqVcc0ibybi9qdk        DHT2cc0ibh0trwbn        o8Wvcc0idfqnskct
bighcc0id4ybmcvz        Fd6Accibw0kyxv6e
BUBFcc0icgn4yl03        mI6Tcc0iay67658q

Examining one of these directories, I can see the configs for a server e.g...
Code:
root@truenas-l2[...docker/truecommand/data/nas-db-backup]# ls bighcc0id4ybmcvz
2021_06_28-TrueNAS-12.0-U3.1.db 2021_07_02-TrueNAS-12.0-U3.1.db
2021_06_29-TrueNAS-12.0-U3.1.db 2021_07_03-TrueNAS-12.0-U3.1.db
2021_06_30-TrueNAS-12.0-U3.1.db 2021_07_04-TrueNAS-12.0-U3.1.db
2021_07_01-TrueNAS-12.0-U3.1.db

The problem is 'Which server?' Is there a way to relate the coded directory to a particular server?
 

aervin

iXsystems
iXsystems
Joined
Jun 13, 2018
Messages
114
I think we could add your NAS nickname to the directory name or file paths. Probably file paths for compatibility reasons. Anyway it's a perfectly reasonable request, but there are some "gotchas" I'll need to discuss with the team. Nice idea!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Currently, you'd have to sqlite3 dump the DBs in each directory to see what system is which.
 

aervin

iXsystems
iXsystems
Joined
Jun 13, 2018
Messages
114
Yes, if all contact with TC is lost abruptly. Without any patches to TC, you can already use TC's servers/list (namespace/name) API to find the system ID -> NAS address (or nickname) mappings. But you'd have to keep track of these manually for now.
 
Joined
Jan 4, 2014
Messages
1,644
Currently, you'd have to sqlite3 dump the DBs in each directory to see what system is which.
Good idea! The only issue here is that sqlite isn't installed by default. It would have to be set up in a jail first.
 
Joined
Jan 4, 2014
Messages
1,644
Yes, if all contact with TC is lost abruptly. Without any patches to TC, you can already use TC's servers/list (namespace/name) API to find the system ID -> NAS address (or nickname) mappings. But you'd have to keep track of these manually for now.
Nice! Workable!

tn05.jpg
 
Top