Command Server Database Backup / Restore Procedure (for Linux OS):
In anticipation of a catastrophic failure, you should always protect your NovaStor DataCenter command server, as this contains the database required to browse and track your backups. This guide does NOT cover migrating from one Command Server (Linux OS) machine to another Command Server (Linux OS) machine in your DC environment (like if you need to replace the OS utilized on the original Command Server with a new OS, and you need to migrate the original Command Server app and app data to a new machine), unlike the equivalent ".. (for Windows)" guide that we have for Windows OS based Command Servers.
The below instructions are for Linux OS based Command Server installations, and it assumes the new server that you are intending to make as the new Command Server, that you are recovering to, is also a client of the original Command Server. There is a separate KB article guide for Windows OS based Command Server installations here.
- Ensure that you have the Linux installer for the Command Server portion of the software. Stop all the services on the new server that we are going to bring up as the new replacement Command Server.
- On the new Command Server machine, run the installer for the Command Server portion of the software, keeping all of the defaults.
-
Stop all running DataCenter processes (services) for Linux on a Command Server node. The process names for those services for what running processes would need to be manually stopped is below. In a Linux shell logged in as root you would first perform a type of ps processfind type of Linux command such as either "ps aux", and look through the list of running processes, or grep for one particular process like with "ps aux | grep nbksrv" for instance to locate the process ID for the single "hiserv" service, if it is running, for that process name that is in the list below. You would then use the kill processname type of Linux command, for instance "kill -9 49910" (if 49910 = the process ID for the "hiserv" process that is running) to stop those processes by name, one by one:
The list of all DataCenter process (service) names, in alphabetical order (Note: DataCenter 9.x added or replaced additional processes, which are noted at the bottom in a separate list). Note: Not all of the processes will be found across every Linux node, there is a note in paratheses to the right of each process name to clue you in if that service was installed on the particular node type:
"DCWebserver" (this process is only found on a DataCenter 7.x or older Command Server node)
"DerbyDB" (this process is only found on a DataCenter 7.x or older Command Server node)
"hijacc" (this process is found on all versions of DataCenter, on all backup server enabled nodes)
"hiserv" (this process is found on all versions of DataCenter, on all backup server enabled nodes)
"mpx" (this process is found on all versions of DataCenter, on all backup server enabled nodes)
"nbksrv" (this process is only found on a DataCenter 8.x or newer backup server enabled client or Command Server node)
"OpenEJBServer" (this process is only found on a DataCenter 7.x or older Command Server node)
"rcmd-dispatcher" (this process is only found on a DataCenter 7.x or older Command Server node)
"rcmd-executor" (this process is found on all versions of DataCenter, on ALL nodes)
"TomEE.amd64" (this process is only found on a DataCenter 8.x or newer Command Server node)
DataCenter 9.x additional processes:
"dcbs" (this process is found on all DataCenter 9.x backup server enabled nodes)
"NovaStorDCCommandServerProxy" (this process is found on a DataCenter 9.x Command Server node)
"postgres" (this process is found on a DataCenter 9.x Command Server node)
"pg_ctl" (this process is found on a DataCenter 9.x Command Server node)
"psql" (this process is found on a DataCenter 9.x Command Server node)
"psql" (this process is found on a DataCenter 9.x Command Server node)
-
You would then run either the "ps aux" or "ps aux | grep hiserv" type of ps processfind type of Linux command again to reference the above process names to see if any of them still appear in the list as running processes, and then stop them using the kill processname type of Linux command ("kill -9 PID"). Once all of the DataCenter processes (services) have been stopped manually like this, then you can proceed.
Note: Hint, if you ever need to restart all of the DataCenter processes (services) on a particular Linux node, to get around not having to restart the Linux machine, is to upgrade the version in place to the same version that is already installed which will stop the services and then restart the services at the end of the installation. This is true for all the different types of DataCenter nodes, client, backup server enabled client, and Command Server.
-
After stopping all of the running DataCenter processes (services), in Step 3 and 4, either copy the /opt/NovaStor folder from the original Command Server or directly restore from a backup of the original Command Server (Example of how to do a GUI based direct restore on Windows is located at: https://support.novastor.com/hc/en-us/articles/360009111954-Restoring-an-unindexed-SV-file-from-a-network-location) or command line direct restore at: https://dcmanual.novastor.com/help-html/dc/en/DirectRestore.html)
- On the new Command Server machine, copy all of those files into the \opt\NovaStor folder and overwrite the files and folders except for the /opt/NovaStor/DataCenter/Hiback/disk folder. This folder contains the configuration for the disk pools, and we want to utilize the ones that are already there on the new / replacement server.
- On the new Command Server you will be required to edit the 'hosts' file (in Linux this is normally /etc/hosts) to place the old / previous Command Server's hostname so that it can point to the local host. Various config files and database will still be referenced as the original Command Server's host name so that is why we need to do this. An example hosts file entry is here: '127.0.0.1 OldCommandServer.domain.local OldCommandServer'. Add a new entry to hosts to add an entry like so, of course change it to what your original / old Command Server's hostname was:
- On the new Command Server machine you will need to be able to perform a ping to ping the old server's DNS name. For example: 'ping OldCommandServer.domain.local' and 'ping OldCommandServer' should both resolve to the localhost at 127.0.0.1 and show a valid ping result.
- On the new Command Server, Start the NovaStor DataCenter services.
- Login to the UI via IP address and port: x.x.x.x:32333
- At that point you can restore files as normal that have been backed up.
If at this point you want clients to be able to back up to this new Command Server you need to add the IP address from the old Command Server server to the new / replacement Command Server server.
If that is not an option you can edit the central-server.properties file in /opt/NovaStor/DataCenter/conf folder on all of the agents to point to the new Linux Command Server.
Batch Scripts to stop/start services
Stop.bat is a batch script to stop NBK DC services.
sc stop "nbksrv"
sc stop "DerbyDB"
sc stop "hijacc"
sc stop "hiserv"
sc stop "mpx"
sc stop "OpenEJBServer"
sc stop "rcmd-dispatcher@port:32335"
sc stop "rcmd-executor@port:32334"
sc stop "DCWebserver"
Start.bat is a batch script to start NBK DC services.
Start.ps1
"nbksrv"
"DerbyDB"
"hijacc"
"hiserv"
"mpx"
"OpenEJBServer"
"rcmd-dispatcher@port:32335"
"rcmd-executor@port:32334"
"DCWebserver"
PowerShell Scripts to stop/start services
Stop.ps1 is a PowerShell script to stop NBK DC services.
"nbksrv", "DerbyDB", "hijacc", "hiserv", "mpx", "OpenEJBServer", "rcmd-dispatcher@port:32335", "rcmd-executor@port:32334", "DCWebserver" | %{ stop-service $_ }
Start.ps1 is a PowerShell script to start NBK DC services.
"nbksrv", "DerbyDB", "hijacc", "hiserv", "mpx", "OpenEJBServer", "rcmd-dispatcher@port:32335", "rcmd-executor@port:32334", "DCWebserver" | %{ start-service $_ }