PGSQL 32bit to 64 bit server to server migration (Postrgesql DB) for NetFlow Analyzer

PGSQL 32bit to 64 bit server to server migration (Postrgesql DB) for NetFlow Analyzer

NetFlow Analyzer installation can be migrated to a different server with old database and configuration provided both the installation are in same version and build number.

Please follow the steps given below to migrate Netflow Analyzer to a different server with PGSQL DB :

NOTE: Make sure that the raw data are dropped using rawCleanup.bat/sh under <NetFlow\troubleshooting> to speed up the migration 

1. Stop the NetFlow analyzer service on the old server and make sure postgres and  java are not running.

2. Install application of same build in new server,  Start and stop the service once. You can download the same version and build number by browsing the below given link:
http://archives.manageengine.com/netflow/

3. Open command prompt as Administrator in New Server and navigate to the installation directory (NetFlow_Home\bin).

4. Execute "reinitialize.bat/sh".

5. Follow the below steps on both the old and the new server -
1) Stop the DB by executing stopDB.bat under NetFlow_Home/bin directory.
2) Navigate to NetFlow_Home/pgsql/data directory.
3) open postgresql.conf file and replace the entry #listen_addresses = 'localhost' with  listen_addresses = '*'
                 by default it will be in form of #listen_addresses = 'localhost'. Just make it  listen_addresses = '*'.

4) open pg_hba.conf file and search for the entry under # IPv4 local connections:
                  add new entry here  host    all             all             all                     trust 

5) Shutdown the DB using stopDB.bat [if still running] and start the DB again using startDB.bat under NetFlow_Home/bin directory.

6. Start the database on both the servers using command prompt by navigating to <NetFlow\bin> and execute startdb.bat respectively.










7. In a new command prompt on the old server navigate to <NetFlow\pgsql\bin> and execute
    
   pg_dump -U postgres -h <Old server IP Address> -p 13310 netflow |  psql -U postgres -h <new server IP Address> -p 13310 netflow
     
Example:
  
   pg_dump -U postgres -h 192.168.1.1 -p 13310 netflow |  psql -U postgres -h 192.168.1.2 -p 13310 netflow

8. Please make sure that there is no communication issue between old and new server and also no error should throw in between migration. (It may take few minutes or hours based on the data)

9. Once the dump is completed, copy the data and tmp folder from the old server Netflow_Home directory to the new server Netflow_Home directory.

10. Stop database on both the servers by executing the stopDB.bat/sh under <NetFlow_Home>/bin

11. Now start the new installation service and check is everything working fine.


Follow the steps below to Move NetFlow Analyzer to a New drive/volume on the same server from 32 to 64bit:


NOTE: Make sure that the raw data are dropped using rawCleanup.bat/sh  under <NetFlow\troubleshooting> to speed up the migration 

1. Stop the NetFlow analyzer 32 bit service . Make sure postgres and  java are not running.

2. Rename the 32bit installation NetFlow folder to NetFlow_old.
  
3. In the 32bit installation navigate to <old_NetFlow>\conf\database_params.conf change the port (find and replace all) from 13310 to 13309.

4. Install 64bit application of same build, start and stop the service and execute reinitializeDB.bat from the loaction NetFlow_Home/bin (64 bit installation port by default will be 13310)

5. Start the database for both the installation in separate cmd prompt from the location <NetFlow\bin> by executing startdb.bat 13310/13309 for 64bit and 32 bit respectively.

6. In a new cmd prompt navigate to 32bit install <old_NetFlow\pgsql\bin>  and execute
    
pg_dump -U postgres -h 127.0.0.1  -p 13309  netflow |  psql -U postgres -h 127.0.0.1 -p 13310 netflow

7. Once the dump is completed . Copy the data and tmp folder from 32 bit installation folder to the 64 bit installation folder.


Note - You can move 32 bit or 64 bit installation in the same manner, make sure you are installing the same build/bit of Netflow Analyzer.

                  New to ADSelfService Plus?