NetBrain Enterprise Edition 6.0a NetBrain Server Backup and Failover Setup Summary NetBrain Enterprise Server includes four components: Customer License Server (CLS), Workspace Server (WSS), Automation Server (AS), Network Server (NS), and Workstation (WS) Client. CLS: Manages the licenses and workspaces WSS: Manages all data for the shared workspace(s) AS: Executes network discovery and performs search indexing NS: Collects data from the live network WS: a thick client installed on users desktops NetBrain provides a script to back up the data in an active Enterprise Server and restore the data in a backup Enterprise Server. The data should be backed up regularly. You can create a daemon process in the active Enterprise Server to run the backup script. The data should be stored in a shared disk which can be accessed by both active and backup Enterprise Servers. It will take up to one hour to get the backup Enterprise Server running if the Active Enterprise Server goes down. This document gives detailed steps to back up and restore the Enterprise Server. Backup Data in Enterprise Server (CLS/WSS) 1. Download the backup script file via this link, and unzip the file to a folder. 2. Run the script Install.bat with administrator privileges. For windows server 2008, right click the Install.bat and choose Run as administrator. Follow the Wizard. Updated November 27, 2015 support@netbraintech.com 1
Note: The password is required for Windows server 2003. Please ensure the username and password entered are correct, as it will not prompt you if they are incorrect. The install.bat script will create a windows schedule task in the host server. You should have write permission for the folder you entered. To check if the schedule task has been created successfully, go to windows Start>Run, enter taskschd.msc to open the Task Scheduler window. Do not close the command line window below while running the backup script! 3. Review the backup results. The following describes the backed up folder and files: Updated November 27, 2015 support@netbraintech.com 2
*License Server: It holds the backed up database file, configuration file of the Customer License Server. * {09634F7B-548E-471E-AB33-96EB31D9E4A1}: CLS GUID which is used to identify this server *CLIC.xml: The configurations file of the CLS. *nbclic.backup: The backed up database file *WPS.xml: The configuration files of the workspace server. *Workspace Server: It holds the backup configuration files of the workspace server *Workspaces: It holds the backed up database file, configuration file and live data of the shared workspaces Activate Backup CLS/WSS server Note: This document describes the setup and restoration process of the DR server. Please pay attention to the keyword [JFS: Just for Setup] as some steps are not necessary for the restoration process once you completed the first time setup. If the active CLS is down, you can follow these steps to active the backup CLS/WSS: 1. Restore NetBrain CLS server a. Install the NetBrain CLS on the backup Server. Notice that the CLS and WSS are checked, please UNCHECK the Register to License Server option when installing the NetBrain System. Browse to the CLS and switch to Workspace page to check the status, if the Workspace Server has been added, click Delete button to remove it.[jfs] b. Send an email to support@netbraintech.com so that we can unbind the license from the old server and you can activate the license on the new server. [Optional] c. Restore the CLS PostgreSQL data: 01) Stop the World Wide Web publishing service and the NetBrain benchmark schedule service. Click windows Start>Run, enter services.msc in the Run window to open Services window. Stop the World Wide Web publishing service and the NetBrain benchmark schedule service. 02) Open Programs>Postgresql 8.4>pgAdmin III and create a new connection. Click File>Add Server. This opens the new server registration window. Name: any unique name, such as NetBrain ES Host: 127.0.0.1 or the IP address of the ES Port: 54321 (please note the default value is 5432, you need to add the number 1 at Updated November 27, 2015 support@netbraintech.com 3
the end of the default value) Password: the password to access the database, (by default it is postgres) Note: If you had the DB connection already, simply double click the existing one to connect to it. 03) Right-click the nbclic node, and select the drop/delete option to delete the old database. 04) Right-click the Databases node to create a new database. Keep the same name nbclic and the default settings. 05) Right-click the new database (nbclic) and select the Restore option. Browse to the file nbclic.backup in the sub folder of the License Server folder. Keep all default options. Then click OK to restore the database. 06) Start the World Wide Web publishing service and the NetBrain benchmark schedule service. 2. Restore the workspace server (WSS) and shared workspace a. Install the workspace server. If the CLS and WSS are installed on the same computer, this has been finished in the previous step. If this is the case, please SKIP this step. b. Restore the first shared workspace. 01) Open Programs > Postgresql 8.4 > pgadmin III, and create a new connection. Click File > Add Server. This opens the new server registration window. Name: any unique name, such as NetBrain ES Host: 127.0.0.1 or the IP address of the ES Port: 54321 (please note the default value is 5432, you need to add the number 1 at the end of the default value) Password: the password to access the database (by default it is postgres) Note: If you had the DB connection already, simply double click the existing one to connect to it. Updated November 27, 2015 support@netbraintech.com 4
02) On the Workspace Server, click All Programs > NetBrain > NetBrain Enterprise Server > Delete Shared Workspaces to open the Delete Shared Workspaces window. Select the Workspace1 entry, and click the Delete button to delete this workspace which is created by default after an installation. [JFS] 03) On the Workspace Server, click All Programs > NetBrain > NetBrain Enterprise Server > Add Shared Workspaces to open the Create Shared Workspaces window. [JSF] 04) Open the WPS.xml file in the sub-folder of the backed up Workspace Server folder, then find the workspace names which are located inside the key word pair <WorkspaceName></WorkspaceName>. Then enter these strings in the Create Shared Workspaces window opened in the last step. (In the following example, the user should enter NB, abc and xyz). Then click the Create button to create these workspaces. [JFS] Updated November 27, 2015 support@netbraintech.com 5
05) Keep the backed up WPS.xml open. Find the database names which are located inside the keyword pair <DBName></DBName> (in this example, the Database name is workspace1 ). Then right-click the database workspace1 node and select the Drop/Delete option to delete the old database. 06) Right-click the Databases node to create a new database. Keep the same name of the database you dropped/deleted in the last step and default settings. In this sample, the Database name is workspace1. 07) Right-click the new database (workspace1) and select the Restore option. Browse to the file workspace1.backup in the sub folder of the Workspaces folder, Keep all default options. Then click OK to restore the Database. 08) Follow the steps below to run some SQL commands to update some values in the restored database. i. Click the restored database then select Tools > Query tool to open the Query window. ii. Open the CLIC.xml file in the folder C:\Windows\SysWOW64\NetBrain\Common\ (or C:\Windows\System32\NetBrain\Common\) and find the GUID value inside the keyword pair <GUID>/<GUID>, then replace the keyword [guid] with the GUID value in the following SQL commands. Make sure that the brace {} is necessary. Updated November 27, 2015 support@netbraintech.com 6
DROP TRIGGER devicegroup_dt ON devicegroup; DROP TRIGGER linkgroup_dt ON linkgroup; UPDATE devicegroup set licguid='[guid]' where licguid<>'-1'; UPDATE linkgroup set licguid='[guid]' where licguid<>'-1'; UPDATE discover_schedule set licguid='[guid]' where licguid<>'-1'; UPDATE objprivatetimestamp set licguid='[guid]' where licguid<>'-1'; UPDATE nomp_telnetinfo set licguid='[guid]' where licguid<>'-1'; UPDATE userdevicesetting set licguid='[guid]' where licguid<>'-1'; UPDATE nomp_jumpbox set licguid='[guid]' where licguid<>'-1'; UPDATE object_file_info set licguid='[guid]' where licguid<>'-1'; UPDATE showcommandtemplate set licguid='[guid]' where licguid<>'-1'; CREATE TRIGGER devicegroup_dt BEFORE INSERT OR UPDATE OR DELETE ON devicegroup FOR EACH ROW EXECUTE PROCEDURE process_devicegroup_dt(); CREATE TRIGGER linkgroup_dt BEFORE INSERT OR UPDATE OR DELETE ON linkgroup FOR EACH ROW EXECUTE PROCEDURE process_linkgroup_dt(); iii. Copy the updated SQL commands and paste to the SQL Editor tab of the Query window. Then click Query > Execute to run these SQL commands 09) Find the ESdata folder in the same folder as the Workspace1.backup file, and copy the whole folder to $ \Netbrain\Enterprise Server\Workspaces\NB. This will replace the old folder. Repeat step 05 to 09 to restore the other shared workspaces. Updated November 27, 2015 support@netbraintech.com 7
c. Log into the new Customer License Server webpage. (Http://your server ip/netbrain). Switch to the Workspace Server tab to add the workspace server entry on this page. Then reallocate the license nodes. 3. Restore NetBrain Network Server. a. Install the Network server. If the network server was installed on the same computer during installation of the CLS/WSS, or it does not need to install because it is ona separate server, please SKIP this step. b. Log on the new Customer License Server webpage (Http://your server ip/netbrain). Switch to the Workspace Server tab to add the workspace server entry on this page. c. Click each of the workspace names on the left pane to browse to corresponding workspace, switch to the Network Server page and delete the old Network server. Click Add A Network Server to add new Network Servers. d. In the Network Server page, click Edit icon to open the Network Server Properties window, click Edit button to move the devices from old Network Server to this new one. 4. Check NetBrain Automation Server Status a. Browser to NetBrain Workspace Server page. http://your server ip/workspaces, and switch to Automation Server page, click Add Automation Server link to add it if you have not added it before. Refresh (Press F5) the webpage to see if the Search Services is indexing. b. Once Search Services shows Index Complete, you can perform serach in Workstatin client with no issues. Note: 1. After backing up Netbrain Server data for the first time, the backup task will be executed periodically based on the task cycle time you have defined. If you want to cancel the task, you could run uninstall. bat as administrator to drop it. 2. If you would like to enable HTTPs in the NetBrain backup server, pleaes refer to this link to setup and configure. Updated November 27, 2015 support@netbraintech.com 8