Skip to main content
Staff & Editor
December 22, 2021

Technical Tip: Restore FortiNAC Database from CLI

  • December 22, 2021
  • 0 replies
  • 3076 views

Description

This article describes how to restore the FortiNAC Database via CLI in case the Database was corrupted.

Scope

FortiNAC.

Solution

Restore the FortiNAC database from the CLI:


Typical scenarios:

  • The disk fails on a RAID-less appliance.

  • The appliance has been reset to factory defaults, and it is necessary to restore the pre-reset remote backup of the database.

  • The FortiNAC hardware is upgraded, and it is expected to restore the most recent remote backup from the previous FortiNAC appliance.

 

Procedure:

  1. Copy (e.g., use winscp) the most recent backup from the remote server to the /bsc/campusMgr/master_loader/mysql/backup directory on the FortiNAC Control Server. Alternatively, it is possible to revert back to an automatic backup created automatically by FortiNAC in the backup folder.

  2. Log into the CLI on the Control Server with root privileges.

  3. Stop the FortiNAC processes:


shutdownNAC

 

  1. Navigate to the /bsc/campusMgr/master_loader/mysql/backup directory and identify the filename of the backup to be used.


Example: FortiNAC_DataBase_BackUp_2021_12_13_00_01_07_fnac88-std1.gz.

 

  1. Navigate to the /bsc/campusMgr/master_loader/mysql directory and restore the database.


Example:

ydb_restore_full_backup FortiNAC_DataBase_BackUp_2021_12_13_00_01_07_fnac88-std1.gz 


For FortiNAC-F, navigate to /bsc/backups/database/ directory and use the sudo command.

fnac:/bsc/backups/database$ sudo 
ydb_restore_full_backup <database_name>


Or:

fnac76  # execute restore database
local <database_name>


  1. Start the FortiNAC processes:


startupNAC

 

Related documents:

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!