Difference between revisions of "Backup and Restore a GigaFlow Configuration"

From Observer GigaFlow Support | VIAVI Solutions Inc.
Jump to: navigation, search
Line 8: Line 8:
 
# Open a Windows command prompt as administrator.
 
# Open a Windows command prompt as administrator.
 
# Assuming that the PostgreSQL path has been added to windows, you can run the pg_dump command below directly. If not, either add it to the path or change the active directory to <code>C:\Program Files\PostgreSQL\X.X\bin</code>, where X.X is the PostgreSQL revision, e.g 9.5.
 
# Assuming that the PostgreSQL path has been added to windows, you can run the pg_dump command below directly. If not, either add it to the path or change the active directory to <code>C:\Program Files\PostgreSQL\X.X\bin</code>, where X.X is the PostgreSQL revision, e.g 9.5.
# Run: <br /><code>
+
# Run: <!--<p><code>
 
pg_dump --host 127.0.0.1 --username=myipfix –exclude table="macaddressvendors" --exclude-table="userevent* --exclude-table="systemhealt*" --exclude-table="savedreportdata" --exclude-table="netflow*"  --exclude-table="arp*"  --exclude-table="cam*"  --exclude-table="searchip*"  --exclude-table="all*" --exclude-table="events*" --exclude-table="all*"  --exclude-table="profilingstats*" --exclude-table="summary*" --dbname=myipfix --clean --create --file=GigaFlowConfigBackup.sql
 
pg_dump --host 127.0.0.1 --username=myipfix –exclude table="macaddressvendors" --exclude-table="userevent* --exclude-table="systemhealt*" --exclude-table="savedreportdata" --exclude-table="netflow*"  --exclude-table="arp*"  --exclude-table="cam*"  --exclude-table="searchip*"  --exclude-table="all*" --exclude-table="events*" --exclude-table="all*"  --exclude-table="profilingstats*" --exclude-table="summary*" --dbname=myipfix --clean --create --file=GigaFlowConfigBackup.sql
</code>
+
</code></p>-->
 
+
 
# You may be prompted for the database password, i.e. <strong>myipfix</strong>. This will create the file GigaFlowConfigBackup.sql in the active directory. Move this to wherever you archive configurations.
 
# You may be prompted for the database password, i.e. <strong>myipfix</strong>. This will create the file GigaFlowConfigBackup.sql in the active directory. Move this to wherever you archive configurations.
  

Revision as of 13:35, 27 March 2019


After making changes to the GigaFlow server’s configuration, it’s important to make a backup of the configuration.

Using Windows:

  1. Open a Windows command prompt as administrator.
  2. Assuming that the PostgreSQL path has been added to windows, you can run the pg_dump command below directly. If not, either add it to the path or change the active directory to C:\Program Files\PostgreSQL\X.X\bin, where X.X is the PostgreSQL revision, e.g 9.5.
  3. Run:
  4. You may be prompted for the database password, i.e. myipfix. This will create the file GigaFlowConfigBackup.sql in the active directory. Move this to wherever you archive configurations.


The following commands will create a db dump of the flowsec configuration. The only thing you should be prompted for is the 'myipfix' password. This will then create the file flowsecdump.sql in your current folder.

pg_dump --host 127.0.0.1 --username=myipfix --exclude-table="macaddressvendors" --exclude-table="userevent*" --exclude-table="systemhealt*" --exclude-table="savedreportdata" --exclude-table="netflow*" --exclude-table="arp*" --exclude-table="cam*" --exclude-table="searchip*" --exclude-table="all*" --exclude-table="events*" --exclude-table="all*" --exclude-table="profilingstats*" --exclude-table="summary*" --dbname=myipfix --clean --create --file=flowsecdump.sql

When restoring (this will drop the existing database on the server!!), stop the flowsec service, upload flowsecdump.sql file to the new machine and execute the following (supply the 'myipfix' password when prompted)

psql --host 127.0.0.1 --username=myipfix < ./flowsecdump.sql psql --host 127.0.0.1 --username=myipfix -c "delete from serverparams where key in('serverid','installtime','license')"

Now restart flowsec.