Our IT and Email management platforms GFI OneGuard and GFI OneConnect have now been launched. Find out more

How to backup GFI LanGuard

DISCLAIMER: GFI Software recommends keeping a backup of the product configuration data. In case of data loss, GFI will not be able to recover your configuration if a backup is not available. If using backup software to backup data, it is required to stop the GFI LanGuard Attendant Service before the backup starts and to start the service again once the backup is complete. Not stopping the service during a backup by third party backup software may cause GFI LanGuard to malfunction.

Backing up GFI LanGuard

Backup of GFI LanGuard includes 3 steps:
  1. Backup the configuration (using the Import and Export Configuration Wizard or Import / Export command line interface)
  2. Backup the database
  3. Backup the Data directory and selected configuration files.

1. Backup the configuration

Option 1: Using the Import and Export Configurations Wizard

  1. Open the GFI LanGuard console and go to File > Import and export configurations…
  2. Select the Export the desired configurations to file option and click Next
  3. Select the location where the file will be saved and click Next
  4. Select the configuration options you would like to export and click Next
  5. Once complete, a .cfg file will be created in the location specified. Make a backup of this file.
The following settings can be exported using the Import and Export Configuration Wizard:
 
  • Scanning Profiles
    • Complete/Combination Scans
    • Vulnerability Assessment
    • Network & Software Audit
  • Ports
    • TCP
    • UDP
  • Custom Reports
  • Scheduled Reports
  • Auto-Remediate Settings
    • Application Auto-Uninstall
    • Patch Autodownload Settings
    • Patch Auto-Deployment 
  • Options
    • Database Backend
    • Alerting Options
    • Computer Filters
    • Internal Settings
 

Option 2: Backup using the import/export command line

  1. On the machine where GFI LanGuard is installed, open a command prompt and change the directory to the LanGuard installation folder
  2. To list all the parameters that can be used to operate the import/export tool, run the command:
    • impex /?
Note: This tool only imports and exports the scanning profiles and vulnerability definitions. No other configuration data is imported or exported when using this tool.
 
/H, /?Or running without parameters displays this help message
/XML:<xmlfile>The filename of the exported/imported file name. This parameter is mandatory.
/DB:<dbfile>The database file to be used during the import/export. If this is not specified, the default operationsprofiles.mdb file will be used.
/EXExports data from the database to a XML file (Default Option)
/MERGEWhen specified and if the target XML file for export already exists, the file will be opened and data will be merged
/IMImports data from XML file to the database
/ONLYNEWERWhen specified only vulnerabilities newer than the newest vulnerabilities in the database will be imported
/PORTSExports/imports all ports
/PORT:<number>Exports/imports the specified port. /PORTTYPE must be specified.
/PORTTYPE:<type>Exports/imports all ports of the specified type
/PROFILESExports/imports all scanning profiles
/PROFILE:<name>Exports/imports the specified scanning profile
/VULNSExports/imports all vulnerabilities
/VULN:<name>Exports/imports the specified vulnerability. /VULNCAT must be specified.
/VULNCAT:<category>Exports/imports all vulnerabilities of the specified category
/SKIPIf an item already exists in the target XML/database, that item will be skipped
/OVERWRITEIf an item already exists in the target XML/database, that item will be overwritten
/RENAME:<value>If an item already exists in the target XML/database, that item will be renamed to the value specified if /PROFILE or /VULN was specified, port information merged if the item is a port, or renamed by prefixing its name with the value specified in any other case
 
Example 1 – Exporting settings
 
impex /XML:”C:\LanGuardSettings.xml”
 
Settings are exported to a single file and when the process is complete, the following message is displayed: 
 
Successfully exported all profiles, vulnerabilities and ports!
 
Example 2 – Importing settings
 
impex /IM /XML:”C:\LanGuardSettings.xml”
 
 When import is complete, the following message is displayed:
 
Successfully imported all profiles, vulnerabilities and ports!
 

2. Backup the database

Microsoft SQL Server database

 
If using a Microsoft SQL Server database for reporting, the database needs to be backed up separately. Refer to http://msdn.microsoft.com/en-us/library/ms187510.aspx for options how to backup a Microsoft SQL Server database.
 

Microsoft Access database

  1. Stop the GFI LanGuard Attendant service
  2. Backup the .mdb file specified in the LanGuard database settings
    • To find out the location of the file, open the LanGuard console and go to Configuration > Database Maintenance Options, and click Database backend settings… 
    • By default the location of the Microsoft Access database is C:\ProgramData\GFI\LanGuard 11\scanresults.mdb
  3. Start the GFI LanGuard Attendant service
Note: If using backup software to backup this folder, it is required to stop the GFI LanGuard Attendant service before the backup starts and to start the service again once the backup is complete. Not stopping the services during a backup may cause GFI LanGuard to malfunction.
 

3. Backup the Data folder

For maximum protection and to give GFI Support the most flexibility to help you restore your GFI LanGuard to the state it was in prior to upgrade please make a copy of the following folders and files:

C:\ProgramData\GFI\LanGuard 11\ directory
OR
C:\Documents and Settings\All Users\Application Data\GFI\LanGuard 11\ directory (on a XP/2003 class computer)

The C:\Program Files (x86)\GFI\Languard 11 Agent\crmiini.xml 
 

Related Articles: