Home » Other Tools and Utilities

Moving Firewall Analyzer's database/ index to different directory in the same server


This procedure is applicable for Firewall Analyzer version 7.5 (Build 7500) onwards

This procedure is applicable for Firewall Analyzer version 7.4 (Build 7400) or earlier

How to find build number?

In the Firewall Analyzer web client, and click the About link in the top pane. You will find the build number mentioned below the build version. This is the build number of the currently installed Firewall Analyzer.

How to move PostgreSQL data to another drive in the same physical machine? 

Follow the steps given below to move the database to a different drive:

  • Stop the Firewall Analyzer server/service, if it is running
  • Check the task manager for the process java.exe and postgres.exe, kill the process if any of these process is running
  • Copy the folder <Firewall Analyzer Home>\pgsql to a folder in another drive (e.g., D:\Firewall\pgsql).i.e., the new location to which you want to move the data of PostgreSQL database
  • Rename the present data folder under pgsql folder as dataold and you can delete it later 
  • Open the setCommonEnv.bat/sh file, located under <Firewall Analyzer Home>\bin directory

    For Windows: 

    Edit the following set database home line: 

    set DB_HOME=%SERVER_HOME%\pgsql 
    as 
    set DB_HOME=D:\Firewall\pgsql 

    where, the D:\Firewall\pgsql is the new location for the PostgreSQL database 

For Linux: 

Edit the following set database home line: 

DB_HOME=$SERVER_HOME/pgsql 
as 
DB_HOME=<absolute path of desired location>/pgsql 

where, the <absolute path of desired location>/pgsql is the new location for the PostgreSQL database 

The above line may slightly differ for various builds, however, ensure that, 
in Windows "set DB_HOME=%SERVER_HOME%\pgsql" is changed to "set DB_HOME=<new drive with absolute path>\pgsql
or 
in Linux the line is changed to "DB_HOME=<absolute path of desired location>/pgsql". 

  • Save the file 

Changes in wrapper.conf file

  • Open the wrapper.conf file, located under <Firewall Analyzer Home>/server/conf directory
  • Change this below line db.home for service to the new PostgreSQL database home

wrapper.java.additional.7=-Ddb.home=../pgsql

  • Save the file 
  • Start the Firewall Analyzer server/service 
  • Check whether the data is correct and the D:\Firewall\pgsql directory size is getting increased


How to move MSSQL data to another drive in the same physical machine?

  1. Stop the Firewall Analyzer Server/Service.
  2. Login to SQL Server database with system administrator permissions.
  3. Find the current location of the data file and log file for the database firewall by using the following commands:

use firewall
go
sp_helpfile
go

  1. Detach the database by using the following commands:

use  master
go
sp_detach_db 'firewall'
go

  1. Copy the data file and log file from the current location (<MSSQL Home>\data\firewall.mdf and <MSSQL Home>\data\firewall_log.LDF)
    to the new location (<New location>\firewall.mdf and <New Location>\firewall_log.LDF).
  2. Re-attach the database and point to the new location by using the following commands:

use  master
go
sp_attach_db 'firewall' , '<New Location>\firewall.mdf' , '<New Location>\firewall_log.LDF'
go

  1. Verify the changed location by using the following commands:

use firewall
go
sp_helpfile
go

  1. Start the Firewall Analyzer Server/Service.

How to move the Firewall Analyzer's Indexes to a different drive/directory on the same server

  • Go to Archive Settings page.
  • Enable Change Raw Logs Indexing Location check box.
  • Modify the Log Indexing Location to the new location and save.
  • Move all the directories from previous location to the new location.

How to move MySQL data to another drive in the same physical machine? 

This procedure is applicable for Firewall Analyzer version 7.4 (Build 7400) or earlier.

How to find build number?

In the Firewall Analyzer web client, and click the About link in the top pane. You will find the build number mentioned below the build version. This is the build number of the currently installed Firewall Analyzer.

Follow the steps given below to move the database to a different drive:

  • Stop the Firewall Analyzer server/service, if it is running. 
  • Check the task manager for the process java.exe and mysqld-nt.exe, kill the process if any of these process is running. 
  • Copy the folder <Firewall Analyzer Home>\mysql\data to a folder in another drive (e.g., D:\Firewall\data).i.e., the new location to which you want to move the data of MySQL database.
  • Rename the present data folder under mysql folder as dataold and you can delete it later. 
  • Open the startDB.bat/sh file, located under <Firewall Analyzer Home>\bin directory. 

    For Windows: 

    Edit the following command in the mysql startup line: 

    --datadir=%DB_HOME%\data 
    as 
    --datadir=D:\Firewall\data 

    where, the D:\Firewall\data is the new location for the MySQL database. 

    After changing the command, the start command will look like: 

    @start /B %DB_HOME%\bin\mysqld-nt --standalone --basedir=%DB_HOME% 
    --port=%DB_PORT% --datadir=D:\Firewall\data --innodb_buffer_pool_size=180M 
    --key-buffer-size=32M --innodb_file_per_table --max_heap_table_size=32M 
    --tmp_table_size=40M --innodb_flush_log_at_trx_commit=0 --log-error 

    For Linux: 

    Please add "--datadir=<desired location>" after "--basedir" attribute in the mysql startup line. 

    After adding the "--datadir" attribute to the command, the start command will look like: 

    #default 
    $DB_HOME/bin/mysqld --no-defaults --basedir=$DB_HOME --datadir=/advent/5g/Working/Latest/data --port=$DB_PORT --socket=$TMP_HOME/mysql.sock --user=root.............. 

    The above command may slightly differ for various builds, however, ensure that, 
    in Windows "--datadir=%DB_HOME%\data"
    is changed to "--datadir=<new drive with absolute path>
    or 
    in Linux "--datadir=<new drive with absolute path>" is added. 

  • Save the file. 
  • Start the Firewall Analyzer server/service. 
  • Check whether the data is correct and the D:\Firewall\data directory size is getting increased.

 

Copyright © 2014, ZOHO Corp. All Rights Reserved.
ManageEngine