Difference between revisions of "Backup and Restore a GigaFlow Configuration"
From Observer GigaFlow Support | VIAVI Solutions Inc.
Line 1: | Line 1: | ||
[[Category:Database]] | [[Category:Database]] | ||
− | |||
== Creating a GigaFlow Configuration Backup == | == Creating a GigaFlow Configuration Backup == | ||
Line 16: | Line 15: | ||
<strong>Warning: the following process will drop the existing database on the server.</strong> | <strong>Warning: the following process will drop the existing database on the server.</strong> | ||
− | + | # Stop the GigaFlow service (GigaFlow.exe). | |
− | + | # Upload the required GigaFlowConfigBackup.sql file to the machine. | |
− | <code> | + | # Run:<br /><code>psql --host 127.0.0.1 --username=myipfix < ./flowsecdump.sql<br />psql --host 127.0.0.1 --username=myipfix -c "delete from serverparams where key in('serverid','installtime','license')"</code> |
− | psql --host 127.0.0.1 --username=myipfix < ./flowsecdump.sql | + | # You may be prompted for the database password, i.e. <strong>myipfix</strong>. |
− | psql --host 127.0.0.1 --username=myipfix -c "delete from serverparams where key in('serverid','installtime','license')" | + | # Restart GigaFlow. |
− | </code> | + | |
− | + | ||
− | + |
Revision as of 13:45, 27 March 2019
Creating a GigaFlow Configuration Backup
After making changes to the GigaFlow server’s configuration, it’s important to make a backup of the configuration.
Using Windows:
- 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
C:\Program Files\PostgreSQL\X.X\bin
, where X.X is the PostgreSQL revision, e.g 9.5. - Run:
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
- 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.
Restoring From a GigaFlow Configuration Backup
Warning: the following process will drop the existing database on the server.
- Stop the GigaFlow service (GigaFlow.exe).
- Upload the required GigaFlowConfigBackup.sql file to the machine.
- Run:
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')" - You may be prompted for the database password, i.e. myipfix.
- Restart GigaFlow.