This article walks you through the steps required to preserve/backup all the data from your Powered-by-Nx product for migration or recovery, and can be used for any of the following scenarios:
- Switching from one Powered-by-Nx product to another without losing data.
- Changing, upgrading, or reinstalling the server Operating System.
- Replacing the server hardware, such as the motherboard or network card.
Warning: If you plan on making any of these changes on a production system, be aware of the potential risks: data loss, difficulty restoring the system, or invalidating your licenses. We recommend you discuss your plans with our support staff first, and once the risks are understood, follow the steps below exactly as they are written on how to back up and restore the necessary data.
Note: Licenses are specific to the original Powered-by-Nx product and cannot be activated on other Powered-by-Nx products.
What data should I backup from my Powered-by-Nx System?
There are two types of data in every Powered-by-Nx system, System data and Server data.
System data is synchronized across all Servers in a System and includes:
- Licenses
- Server settings
- System resources and their configuration (cameras, streams, I/O devices, URLs, Layouts, etc from the resource panel)
Server data is specific to each Server in a System, is not synchronized, and must be backed up independently for each Server for a full recovery or migration. Server data includes:
- Server database - Audit Trail and Bookmarks
- Video archives - recorded video and audio from connected devices and streams
- Smart motion index - motion metadata used for smart motion search
- Certificate - Server TLS/SSL certificate file
- Analytics data - metadata captured by 3rd party video analytics (optional)
For detailed information about what each file contains, please check this article.
Version Compatibility
When using this process to back up and restore/migrate your data, it is essential to remember the VMS version that you backup and restore using the same VMS version and similar build number.
For example, if a backup was made on Nx Witness 3.2.0.28676, you must restore the backup to a Powered-by-Nx VMS that’s at least version 3.2 and build 28676 or higher (e.g., 3.2.0.28749, 3.2.0.29151, etc.).
After you have successfully migrated to the new Powered by Nx product you can perform an in-client update to get the latest version.
Although the changes will not apply to all servers, it is still strongly recommended to follow the same back up procedure on each server in the Powered-by-Nx System to your external storage before you attempt this process.
Understanding the instructions
File paths for Ubuntu servers and Windows servers will be provided for each step. The file paths have been modified with variables to be applicable for the different Powered-by-Nx products and storage locations. Please note the capitalization and spacing of the variables.
Replace <COMPANY NAME> or <companyname> with the name of the company that provides the Powered-by-Nx product (for example, Network Optix or networkoptix), <VMS NAME> with the name of the Powered-by-Nx VMS itself (for example, Nx Witness), <DISK> with the drive letter in Windows (for example, D, E, F, etc.), <drive> with the mount point in Ubuntu (for example, media, mnt, etc.), and <drivename> with the name of the drive.
For example, in an Nx Witness installation on Windows, the file pathC:\Program Files\<COMPANY NAME>\<COMPANY NAME>
would look likeC:\Program Files\Network Optix\Nx Witness
A. Back up your Powered-by-Nx System
- If your server is part of a multi-server system, detach it from the system before continuing. Replicate these steps for any other server as necessary.
- Backup of the system database. Click the Main Menu button and navigate to System Administration (CTRL+ALT+A), then click Create Backup.... to proceed with the backup process.
- Copy the backup file (*.db) to your external storage to keep it safe.
- Stop the Powered-by-Nx Server application/service from running
-
Windows:
Open Taskmanager > Services tab > right-click on the “MediaServer” service > click Stop. -
Ubuntu:
Open Terminal and type insudo systemctl stop <companyname>-mediaserver.service
(for example, sudo systemctl stop networkoptix-mediaserver.service).
-
- Create the backup file of the following data.
License key and Hardware ID- If you are not changing the motherboard or network card — You will not have to detach the server from the system for this process since the Hardware ID (HWID) does not change. After the release of version 3.0, the HWID only changes if the motherboard or network card changes. Other hardware or OS changes should not cause any issues. However, we still recommend you to back up your licenses before making any changes, copy and save all the license keys and the HWID of the server.
- If you are changing the motherboard or network card — The HWID will change. Detach your server from the System and backup your licenses. Deactivate the licenses so you can reactivate them later. (Keep in mind there is a limit to the number of times a license key can be reactivated on different hardware.)
- If you are changing from one Powered-by-Nx product to another — You will have to purchase new licenses as the same licenses will not work on a different Powered-by-Nx product.
Server Database
-
Windows:
C:\Windows\System32\config\systemprofile\AppData\Local\<Company Name>\<Company Name> Media Server\mserver.sqlite -
Ubuntu:
/opt/<company name>/mediaserver/var/mserver.sqlite
Server Settings
Instead of copying the entire file, only save the values from the following parameters to a text file: serverGuid, storedMac, and systemName.
-
Windows:
In the Taskbar search box, type regedit and select Registry Editor (top result):
HKEY_LOCAL_MACHINE\SOFTWARE\<COMPANY NAME>\<COMPANY NAME> Media Server -
Ubuntu:
In Terminal, type vi <filepath>. Find and save the appropriate values to an external document.
/opt/<company name>/mediaserver/etc/mediaserver.conf
Certificate (if required, when a custom certificate was added either self-signed or from a Certificate Authority.)
-
Windows:
C:\Windows\System32\config\systemprofile\AppData\Local\<Company Name>\<Company Name> Media Server\ssl\ -
Ubuntu:
/opt/<Company Name>/mediaserver/var/ssl/
Smart Motion metadata
-
Windows:
C:\Windows\System32\config\systemprofile\AppData\Local\<Company Name>\<Company Name> Media Server\record_catalog -
Ubuntu:
/opt/<Company Name>/mediaserver/var/record_catalog
Video archives
Only copy the hi_quality and low_quality folders.
-
Windows:
<Disk>:\<VMS Name> Media\<Server UUID>\
Note: Nx Server 4.2 and below does not create the <Server UUID> folder. -
Linux
/opt/<Company Name>/mediaserver/var/data/<Server UUID>/
AND (if using multiple video storage drives)/ OR (if using a non-default video storage drive)<Mount Point>/<Server UUID>/
Note: Nx Server 4.2 and below does not create the <Server UUID> folder.
Analytics data (skip this step if you don’t have analytics data)
- The file path depends on which drive is storing analytics data. Go Server Settings > Storage Management > Storage Locations, you can tell a drive is storing analytics data if it says “Stores analytics data”.
- Go to each storage that stores analytics data and back up the data folder and database file (respectively).
-
Windows:
<Disk>:\<VMS Name> Media\<Server UUID>\archive
<Disk>:\<VMS Name> Media\<Server UUID>\objects_detection.sqlite
Note: Nx Server 4.2 and below does not create the <SERVER UUID> folder. -
Ubuntu:
/opt/<Company Name>/mediaserver/var/data/<Server UUID>/archive
/opt/<Company Name>/mediaserver/var/data/<Server UUID>/objects_detection.sqlite
OR (if using a non-default analytics storage drive):
/<Mount Point>/<Server UUID>/archive
/<Mount Point>/<Server UUID>/objects_detection.sqlite
Note: Nx Server 4.2 and below does not create the <Server UUID> folder.
-
- Make sure all necessary data has been backed up to an external storage drive instead of the OS disk.
Note: To prevent server conflicts, make sure that the previous Powered-by-Nx Server will never be online in the same network as the new one.
B. Proceed with the scenario that applies to you
Replace the server hardware.
If the main storage drive/OS drive is being replaced see Change, upgrade, or reinstall the server OS.
Change, upgrade, or reinstall the server OS.
- Keep in mind our list of officially supported operating systems.
- Before wiping your OS drive, write down the version of the currently installed Server application (for example, 4.0.0.29887). To find it, open the Desktop client and connect to the server. Click on Main Menu > About (F1), you will see the version number next to your server name under System Servers.
- Download and install the same version of your Powered-by-Nx product. Go through the initial setup process.
Switch from one Powered-by-Nx product to another.
- Write down the version of the currently installed Server application (for example, 3.2.0.29657). To find it, open the Desktop client and connect to the server. Click on Main Menu > About (F1), you will see the version number next to your server name under System Servers.
- If the server has an OS that is not officially supported, please install a new 64-bit OS from our list of officially supported operating systems. Supported Windows and Ubuntu options are under "Nx Server Application".
- If not installing a new OS, do a clean uninstall of your existing Powered-by-Nx product.
- Download and install your new Powered-by-Nx product. Make sure that it's the same version as the one you wrote down earlier. Go through the initial setup process.
Note: Please take notice that licenses are product specific and can't be activated on other Powered-by-Nx products, other than the original product.
C. Restore your Powered-by-Nx System
- Log into the Server via the Desktop client.
- Restore the system database. Click the Main Menu button and navigate to System Administration (CTRL+ALT+A). Click Restore from Backup... and select the backup file of the system database (*.db).
- The name of the previous system will be restored and the newly set up system will appear offline and can be removed by left-clicking the x in the top right corner.
- Stop the Server application service:
-
Windows:
Open Taskmanager > Services tab > right-click on the “MediaServer” service > click Stop. -
Ubuntu:
Open Terminal > type in “sudo systemctl stop <companyname>-mediaserver.service”
(for example, sudo systemctl stop networkoptix-mediaserver.service)
-
- Connect all the storage drives.
- Copy and paste (overwrite) the backup files to the corresponding path of the new server:
Server database-
Windows:
C:\Windows\System32\config\systemprofile\AppData\Local\<COMPANY NAME>\<COMPANY NAME> Media Server\mserver.sqlite -
Ubuntu:
/opt/<companyname>/mediaserver/var/mserver.sqlite
Server Settings
Using the values (serverGuid, storedMac, and systemName) you saved in the earlier text file, replace the corresponding values in the appropriate file below:
-
Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\<COMPANY NAME>\<COMPANY NAME> Media Server -
Ubuntu:
/opt/<companyname>/mediaserver/etc/mediaserver.conf
Note: Ensure that the parameter guidIsHWID is set to no.
Certificate (if required, when a custom certificate was added either self-signed or from a Certificate Authority.)
-
Windows:
C:\Windows\System32\config\systemprofile\AppData\Local\<COMPANY NAME>\<COMPANY NAME> Media Server\ssl\ -
Ubuntu:
/opt/<companyname>/mediaserver/var/ssl
Smart Motion metadata
-
Windows:
C:\Windows\System32\config\systemprofile\AppData\Local\<COMPANY NAME>\<COMPANY NAME> Media Server\record_catalog -
Ubuntu:
/opt/<companyname>/mediaserver/var/record_catalog
Video archive
Transfer the backup folders (hi_quality and low_quality) to the <VMS NAME> Media folder of all connected disks (all db and .ref files within should be deleted).
-
Windows:
<DISK>:\<VMS NAME> Media -
Ubuntu:
/opt/<companyname>/mediaserver/var/data
<driveId>/
Analytics data (skip this step if you don’t have analytics data)
- Choose which storage location(s) will store your analytics data. Go to Server Settings > Storage Management. Any eligible drive will display the option "Use to store analytics data" upon hovering over that drive. Click on that option to begin storing analytics data on that drive, one folder and one file will be created: archive and objects_detection.sqlite.
- Go to each storage location and paste the files you saved in Section A
-
Windows:
<DISK>:\<VMS NAME> Media\archive
<DISK>:\<VMS NAME> Media\objects_detection.sqlite -
Ubuntu:
opt/<companyname>/mediaserver/var/data/archive
opt/<companyname>/mediaserver/var/data/objects_detection.sqlite
AND/OR
<drive>/$USER/<drivename>/archive
<drive>/$USER/<drivename>/objects_detection.sqlite
-
-
- Start the Server application service and log in to the system using the Desktop client. If you had to deactivate your license (see Section A > Step 2), activate each license now.
- Go to Server Settings > Storage management tab and remove the old storage locations that show up as “inaccessible”.
- Click Reindex Archive. Wait for the process to complete.
- Merge your server with any other system as needed.
- Perform an in-client upgrade to the latest version of the Powered-by-Nx product:
Main Menu > System Administration > Updates
Note: If you face any issue while retrieving the license key(s), please refer to this article for information to be provided for restoring the license key(s).
Questions
If you have any questions related to this topic or you want to share your experience with other community members or our team, please visit and engage in our support community or reach out to your local reseller.
Comments
0 comments
Article is closed for comments.