Backup/Recovery/Transfer BMS Server
Making a backup of the NETx BMS Server and its components is of utmost importance. There are several scenarios where the configuration of the NETx BMS Server and its components has to be restored:
- Hardware failures: if the system is going down due to an irreparable hardware failure (e.g. hard disk crash, motherboard failure), a new system has to be set up. In order to restore the operation of the NETx BMS Server and its components, the configuration has to be restored on the new system.
- Transferring the configuration from one system to another: sometimes it is necessary to transfer the whole configuration of the NETx BMS Server and its components to another system. A typical scenario would be the transfer of the configuration from the development PC (e.g. laptop of the system integrator) to the production machine on-site. To achieve this, a backup of the source machine has to be restored at the destination machine.
- Unintended modifications or data loss: restoring a backup can help to overcome unintended modifications, data loss of parts of the configuration, or even the loss of the whole data. A typical example would be an unintended deletion of a configuration file during the development process. In such cases a backup can be used to restore the lost information.
The NETx BMS Server is not a single Windows application. The functionality NETx BMS Server is divided into different software components that are communicating with each other. In order to make a full backup, these components have to be considered separately. The following figure shows an overview of these components and how that they are related to each other. The current version of the NETx BMS Server contains of following software components.
- NETx BMS Server: it is the core component that implements the main functionality. The NETx BMS Server\ itself runs as a Windows service in background.
- NETx BMS Server Studio: the NETx BMS Server Studio is a Windows application that provides the management interface. The NETx BMS Server Studio is used to configure and maintain the NETx BMS Server\ and its components.
- Web server: the web server is a Windows service that provides the web based visualization clients (also called NETx BMS Clients). The web server is communicating via a local connection with the server component.
- NETx BMS Client Editor: this Windows application is used to design the web based visualization clients. The NETx BMS Client Editor is started from the NETx BMS Server Studio.
- XLogic Editor: the XLogic Editor is a graphical editor for implementing control functionality within the NETx BMS Server. It is a separate Windows application that is started within the NETx BMS Server Studio.
- NETx MaRS Module: the NETx MaRS Module is dedicated to energy reporting. It acts as a client application that retrieves smart metering data from the NETx BMS Server. In addition to visualize and monitor consumptions values, cost calculation can be performed too. The NETx MaRS Module is a standalone Windows application which is started within the NETx BMS Server Studio.
- Historical database: the NETx BMS Server uses a Microsoft SQL 2014 instance to store past values of data points that are marked as historical within the NETx BMS Server Studio. This historical data can be used by management clients for trending applications. A typical example would be a chart within a visualization that shows past data point values.
Backup procedure
To make a full backup of the NETx BMS Server and its components, several steps are necessary:
NETx BMS Server: all configuration and runtime files that the NETx BMS Server needs during operation as well as the directories that include these files are referred to as workspace. While a single NETx BMS Server installation can contain multiple different workspaces, only one single workspace can be active. The workspaces are located within the following directory:
<Install Directory>\NETxAutomation\NETx.BMS.Server.2.0\Workspaces
For example, within a 64 bit Windows system, the default path is:
C:\Program Files (x86)\NETxAutomation\NETx.BMS.Server.2.0\Workspaces
To make a backup of all workspaces, the whole contents of the workspaces directory mentioned above has to be copied to the backup medium.
NETx BMS Server Studio: the NETx BMS Server Studio does not use any additional data that has to be added to the backup. All configuration and runtime files are included in the workspace of the NETx BMS Server.
Web server: also the web server does not store any additional data that is relevant for a backup. All configuration and runtime files are part of the workspace of the NETx BMS Server.
NETx BMS Client Editor: the source files and all configuration data of NETx BMS Client Editor visualizations are stored within separate workspaces. Each visualization project corresponds to one workspace. All workspaces are located within the following directory:
<Install Directory>\NETxAutomation\BMS.Client.Editor\Workspaces
For example, within a 64 bit Windows system, the default path is:
C:\Program Files (x86)\NETxAutomation\BMS.Client.Editor\Workspaces
To make a backup of all workspaces, the whole contents of the workspaces directory mentioned above has to be copied to the backup medium.
In addition, it is possible to create libraries which contain graphical components that can be reused in visualization projects. All libraries are located within the following directory:
<Install Directory>\NETxAutomation\BMS.Client.Editor\Libraries
For example, within a 64 bit Windows system, the default path is:
C:\Program Files (x86)\NETxAutomation\BMS.Client.Editor\Libraries
To make a backup of all libraries, the whole contents of the library directory mentioned above has to be copied to the backup medium.
XLogic Editor: The XLogic Editor uses several directories and files to store the defined control logic (also called XCommands) and its source code. All files and directory are located within the following directory:
<Install Directory>\NETxAutomation\NETx.BMS.Server.2.0\NXA.XLOGIC\
DEFINITIONS: here, the definitions of the available blocks within the object catalog of the XLogic Editor are stored.
MODULES: this directory contains the compiled versions of all available commands that can be executed by the \productbmsserver. Files that contain the compiled command code have the file extension ``.xlogic''. If commands shall be transferred from one NETx BMS Server to another one, the content of this directory has to be copied.
PROJECTS: here, the source code of all commands are stored. Files that contain source code have the file extension ``.xprj.xml''. If a command is transferred to another \productbmsserver\ and if it is also desired to change the command, the corresponding ``.xprj.xml'' file has to be copied too. Note that in that case, it may also be necessary to copy the content of the ``DEFINITIONS'' directory.
To make a backup of all XCommands and their source code, the whole contents of the NXA.XLOGIC directory mentioned above has to be copied to the backup medium.
NETx MaRS Module: the workspace i.e. the configuration and runtime files of the NETx MaRS Module are incorporated into the workspace directory of the NETx BMS Server. Therefore the backup of the workspaces of the NETx BMS Server automatically includes the workspaces of the NETx MaRS Module.
Historical database: the NETx BMS Server uses a Microsoft SQL 2014 instance to store historical data. To backup this SQL instance, it is recommended to use the standard backup procedures that are provided by Microsoft. One possibility is to use the "`Import and Export Data"' utility which is installed together with the database instance.
Recovery procedure
To restore a backup of the NETx BMS Server, the data from the backup medium has to be transferred to the destination machine. Depending on the used software components, the following steps are necessary:
NETx BMS Server: to recover the workspace of the NETx BMS Server, the backup has to be copied to the following directory:
<Install Directory>\NETxAutomation\NETx.BMS.Server.2.0\Workspaces
For example, within a 64 bit Windows system, the default path is:
C:\Program Files (x86)\NETxAutomation\NETx.BMS.Server.2.0\Workspaces
- NETx BMS Server Studio: since the NETx BMS Server Studio does not have any additional configuration data, no additional steps for recovery are necessary.
- Web server: the web server does not use any additional data. Therefore, no additional steps for recovery are necessary.
NETx BMS Client Editor: to restore the workspace of the NETx BMS Client visualizations, their backup has to be copied to the following directory:
<Install Directory>\NETxAutomation\BMS.Client.Editor\Workspaces
For example, within a 64 bit Windows system, the default path is:
C:\Program Files (x86)\NETxAutomation\BMS.Client.Editor\Workspaces
To restore user-defined libraries, the following directory has to be recovered:
<Install Directory>\NETxAutomation\BMS.Client.Editor\Libraries
For example, within a 64 bit Windows system, the default path is:
C:\Program Files (x86)\NETxAutomation\BMS.Client.Editor\Libraries
XLogic Editor: The XLogic Editor uses several directories and files to store the defined control logic and its source code. All files and directory are located within the following directory:
<Install Directory>\NETxAutomation\NETx.BMS.Server.2.0\NXA.XLOGIC\
To restore the control logic and its source code, the backup has to be copied to the following sub directories:
DEFINITIONS: \here, the backup of object catalog has to be copied.
MODULES: within this directory, the backup of the compiled commands has to be restored.
PROJECTS: if the source code of the commands has to be recovered too, its backup has to be copied to this directory.
NETx MaRS Module: since the workspace of the NETx MaRS Module is part of the NETx BMS Server 's workspace, it is restored during the recovery procedure of the workspace of the NETx BMS Server.
Historical database: to recover the Microsoft SQL 2014 instance of the NETx BMS Server, the recovery function of the tool that was used to create the backup (e.g. the "`Import and Export Data"' utility) has to be executed.
Transfer project
To transfer a BMS project from the development PC to the production machine, there are two possibilities.
Using the GUI:
- BMS workspace: Within the BMS Studio, use the import/export function to transfer the BMS server workspace (menu "Workspace" --> "Export ..." / "Import ...")
- XLogic script: open the XLogic editor and use the import/export function to transfer all XLogic commands. If you would like to transfer only the compiled version of the commands, use "Export --> Modules". If you would like to change the XLogic commands on the destination PC, use "Export --> Modules and Sources"
- SQL Database (if necessary): normally this is not necessary since the SQL database only includes historical data and no configuration. Anyhow, if needed, use import/export tool that is provided by MS SQL.
- BMS Client Editor (if necessary): the BMS workspace contains the compiled BMS client projects. If you would like to change the visualization project on the destination PC, the source i.e. the BMS Client workspace has to be transferred too. To do so, open the visualization project at the source machine and export it ("Workspace" --> "Export"). Copy the .vxw file to destination machine. In the BMS studio, right-click on "Visualization projects" and select "Add visualization project"
Manually:
You can use the backup/restore procedure mentioned above.