Best practices for moving from FreeNAS server to a new TrueNAS server (?)

icdadmin

Dabbler
Joined
Jun 7, 2018
Messages
28
I currently have a FreeNAS server (FreeNAS-11.2-U8) with 2 Pools and around 100 user accounts. I would like to move this to a new TrueNAS Core server. In the process, I would like to consolidate the datasets of the 2 Pools of the old server into a single Pool on the new server.

I'm hoping for advice or best practices on how to do this type of thing and how to transfer the user account information and data.

I'm relatively new to this as I've recently inherited the duties of administering this server in this type of scenario and appreciate any help anyone can provide.

Mike
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
The best advice I can think of for the user accounts is to upgrade... 11.2 -> 11.3, then 12.0, then 13.0.

For the pool changes, you can do that any time you like, you just need to identify where (like for every user and their home directory) you would need to change paths to correspond.

Any transfer of data from a dataset on the old pool to a dataset on the new one would be done via replication or manually with zfs send | recv.
 

icdadmin

Dabbler
Joined
Jun 7, 2018
Messages
28
The best advice I can think of for the user accounts is to upgrade... 11.2 -> 11.3, then 12.0, then 13.0.

For the pool changes, you can do that any time you like, you just need to identify where (like for every user and their home directory) you would need to change paths to correspond.

Any transfer of data from a dataset on the old pool to a dataset on the new one would be done via replication or manually with zfs send | recv.
So, if I'm moving to a new physical machine, can I use replication or zfs send/recv through the network? And for transferring user accounts, is there an export that I can do on the current machine that can then be imported into the new machine?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
can I use replication or zfs send/recv through the network?
Yes.

for transferring user accounts, is there an export that I can do on the current machine that can then be imported into the new machine?
Not really, config import only deals with the entire config and is not selective.

I wouldn't recommend direct editing of the sqlite db either as there are likely to be issues with partial changes to the db if you don't fully understand the structure.

I suppose somebody with the skills could create a script to do that via API, but your old system uses an API that nobody would be interested in at this point, so highly unlikely.

Maybe some mix of the old sqlite DB being read for the user list and then API calls to create those users on the new... a lot of work which may take much longer than either taking the whole config and just removing the bits you don't want or just upgrading in-place.

With a user list that long, it's a little surprising you didn't switch to using an external directory of some kind (NIS, LDAP, AD).
 
Joined
Jul 3, 2015
Messages
926
With a user list that long, it's a little surprising you didn't switch to using an external directory of some kind (NIS, LDAP, AD).
Agree with this. Perhaps now is the time?
 

icdadmin

Dabbler
Joined
Jun 7, 2018
Messages
28
Just so I make sure I'm understanding this correctly: if I create a replication task to transfer pools/datasets to a backup machine and then migrate my user accounts to OpenLDAP (I'm not sure how to do this yet though), then can both my live server and the backup both use the OpenLDAP server's user account information to correctly give permissions to datasets since the backup is a replica of the live? Thus, creating a true backup/failsafe machine that could be used immediately if the live server ever suffered a major issue.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
migrate my user accounts to OpenLDAP
If you don't use SMB shares, that's fine. Otherwise, you'll need to use Active Directory instead... (can be SAMBA server AD if you were looking to avoid paying Microsoft)

an both my live server and the backup both use the OpenLDAP server's user account information to correctly give permissions to datasets since the backup is a replica of the live?
Yes.
 
Joined
Jun 15, 2022
Messages
674
For the user account transfer, can the old machine be upgraded to a current version, then the user accounts migrated?
 

icdadmin

Dabbler
Joined
Jun 7, 2018
Messages
28
For the user account transfer, can the old machine be upgraded to a current version, then the user accounts migrated?
Yes, I can upgrade it. I was trying to do the backup/failsafe prior to upgrading it, just in case something goes wrong. But, are you saying that newer versions allow for migrating user accounts?
 
Joined
Jun 15, 2022
Messages
674
Yes, I can upgrade it. I was trying to do the backup/failsafe prior to upgrading it, just in case something goes wrong. But, are you saying that newer versions allow for migrating user accounts?
I am wondering that myself because I haven't found a way to migrate accounts created in TrueNAS from one TrueNAS machine to another TrueNAS machine.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
This is what I do, and how we deal with server upgrade at work.

Get new hardware
Migrate as is
Upgrade new server
Do final sync and switch over

On the question on accounts. If you have more the three, for the love of the holy BSD, get a directory
 
Joined
Jun 15, 2022
Messages
674

icdadmin

Dabbler
Joined
Jun 7, 2018
Messages
28
I think it is indeed time to move to a SAMBA server's AD implementation, mentioned above by sretalla. Though, honestly, I'm not sure at all how to pull that off. But, it seems like this is necessary for the user account handling. Then, I can deal with the backup/failsafe server implementation after that.
 
Joined
Jun 15, 2022
Messages
674
Maybe look into manually extracting the database to a CSV file, then importing that into your name service software. With 100+ uses that's perhaps the way to go.
 
Top