Migrating the NX Server 3.5.0 installation from one machine to another one
Before following the guidelines below, check what your entitlements are if you are migrating the server installation to a different OS from the one you were previously using (AR01F00497). The SLA is also outlines what your entitlements are (SLA).
You can follow procedure below to migrate your NX installation from machine A to machine B.
Please also check our licensing policies for multi-CPU and core systems if you are moving your installation:
Note that it is not possible to migrate sessions running on machine A to machine B since for each running/disconnected session there is a nxnode and a nxagent process and a nxserver instance running on machine A.
Disable access to new sessions on machine A
# /usr/NX/bin/nxserver --stop
Send a message to all the running sessions on machine A
You can send a message to advise users that their sessions are going to be terminated. Message should be written on a single line
# /usr/NX/bin/nxserver --broadcast "your message here"
Terminate all the running sessions on machine A
# /usr/NX/bin/nxserver --shutdown
Create a backup of the current NX installation on machine A
# tar cvzf /root/nx-BACKUP-YYYYMMDD.tar.gz /usr/NX
# chmod 0600 /root/nx-BACKUP.tar.gz
Install NX Server on machine B
Follow the installation procedure suitable for the OS on machine B. Installation guides are available here: http://www.nomachine.com/documents
Migrate system users from machine A to machine B
The same NX user accounts available on machine A have to be present on machine B. In order to do this, you may copy the user related entries from the file /etc/passwd stored on machine A to the same file on machine B. Make sure that the GID and UID are unique; if necessary you can use the usermod command or similar Unix command. The same procedure is necessary for the file /etc/group if these users belong to one or more groups.
Migrate user home directories from machine A to machine B
Copy all the relative user home directories preserving ownership and permissions from machine A to machine B.
Migrate NX Server DBs from machine A to machine B
Copy all the *.db files from the /usr/NX/etc directory on machine A to the /usr/NX/etc directory on machine B. These files are:
/usr/NX/etc/administrators.db
/usr/NX/etc/guests.db
/usr/NX/etc/nodes.db
/usr/NX/etc/passwords.db
/usr/NX/etc/profiles.db
/usr/NX/etc/users.db
Some of this files may have size 0 because they are not in use. This is the case for example of guests.db when support for the automatic generation is not activated.
Then ensure that all the *.db files on machine B have the proper ownership:
# cd /usr/NX/etc
# chown nx:root *.db
Set the public key authentication for NX users on machine B
In order to ensure that all the NX users are able to authenticate on machine B, you need to set the ssh key for each user by running the following command:
# nxserver --usercheck USERNAME
If the number of NX users is quite high, it is possible to use a for cycle to automate the update operation. The /usr/NX/etc/users.db file contains all the usernames of the NX users, so this can be used as the NX users database when adopting the for cycle.
Synchronize server and node configurations files on machine B
If you are using non-default configurations on your machine A, you need to import these settings onto machine B.
Although it should be enough to replace server and node configuration files on machine B with the correspondent configuration files used on machine A, it is advisable to adopt the procedure described below. This will allow the replication of your previous configuration on the new NX environment . In order to synchronize server/node configuration on machine B with the current configuration on machine A, you should:
-
Retrieve on machine A all the keys with a value different to the default. You can easily get this list by comparing the node and server .cfg.sample files corresponding to your O.S. with the node and server .cfg files actually in use. For example:
# diff /usr/NX/etc/node-suse.cfg.sample /usr/NX/etc/node.cfg
# diff /usr/NX/etc/server-suse.cfg.sample /usr/NX/etc/server.cfg
- Update the server and node configuration files on machine B accordingly.
