Database Restore Procedure for GravityZone Appliance

Database Restore Procedure for GravityZone Appliance

Steps to Restore the Database (GravityZone)

This article outlines the procedure for restoring a GravityZone (GZ) database from a backup file to a newly deployed appliance.

Prerequisites:
  • Latest GravityZone Appliance Image
  • Database Backup File (e.g., gz-backup-2019-05-17.tar.gz)
  • SSH Client (PuTTY/Terminal) and SFTP Client (WinSCP)

1. Deploy New Appliance

⚠️ CRITICAL:
  • Do NOT enable Secure Communication VPN at this stage.
  • Do NOT deploy any roles yet.

2. Transfer Backup File

Copy the database backup file (e.g., gz-backup-2019...tar.gz) to the location below using WinSCP or a similar tool. Do not extract the file.

/home/bdadmin

3. Restore the Database

Connect to the appliance via SSH and execute the commands in the following order.

# Switch to root user
sudo su
# 3.1 Install Database Role (Replace 'Database Password Here')
/opt/bitdefender/eltiw/installer -n install db 'Database Password Here'
# 3.2 Stop Required Services
systemctl stop vasync gz-update-system-service bd-installer@tty1
# 3.3 Disable MongoDB Authentication
sed -i 's/authorization: enabled/authorization: disabled/g' /etc/mongodb.conf
service mongodb restart
sleep 30
# 3.4 Restore Backup (Replace DUMP-NAME.gz with actual filename)
mongorestore --noIndexRestore --nsExclude "admin.*" --nsExclude "installer.*" --drop --gzip --archive=/home/bdadmin/DUMP-NAME.gz
# 3.5 Remove Conflicting Data
mongo local --quiet --eval 'db.dropDatabase()'
mongo devdb --quiet --eval 'db.packageStats.remove({})'
mongo devdb --quiet --eval 'db.endpointKits.remove({})'
mongo devdb --quiet --eval 'db.applianceSpecifics.remove({})'
mongo devdb --quiet --eval 'db.vpnSettings.drop()'
mongo devdb --quiet --eval 'db.vpnCluster.drop()'
# 3.6 Remove Non-Database Roles
mongo devdb --quiet --eval 'db.applianceInstalls.remove({name:{$ne:"db"}})'
# 3.7 Select Appliance ID (Replace 'Database Password Here')
/opt/bitdefender/bin/mongoshell -u bd -p 'Database Password Here' --eval 'print(db.applianceInstalls.findOne({name:"db"}).applianceId);' --quiet devdb > /opt/bitdefender/etc/applianceid
# 3.8 Remove Entries with Incorrect IDs
mongo devdb --quiet --eval 'db.applianceInstalls.remove({applianceId:{$ne:"'"${applid}"'"}})'
# 3.9 Re-Enable Authentication
sed -i 's/authorization: disabled/authorization: enabled/g' /etc/mongodb.conf
service mongodb restart
sleep 150
# 3.10 Start Services
service vasync start; sleep 120
systemctl start bd-installer@tty1
STOP: Do NOT reboot yet. Proceed to step 4.

4. Install Remaining Roles

From the Blue CLI Installation Wizard, install the following roles:

  • Update Server
  • ECS Communication
  • Web Console
  • Incident Role (Only for Premium or Enterprise licenses)

Note: If required, you may also enable Secure Communication VPN at this point.

5. Reboot & Verify

Reboot the appliance. After the reboot, access the GravityZone Web Console. It should now be fully operational.


    • Related Articles

    • Steps to Deploy Bitdefender Gz Virtual Appliance on Hyper-V

      Hyper-V Hardware Requirements Check that your computer meets the Hyper-V role hardware and software requirements: Operating system: Windows Server or Windows 10/11 Enterprise, Pro, or Education editions (you cannot install Hyper-V on Windows Home); ...
    • Bitdefender GravityZone On-Premises Console System Requirements

      Hello, Kindly refer below Minimum requirements for up to 100 to 200 users to GravityZone On-premises console deployment. Hardware: Offline Server Processor: Virtual equivalent to 8 vCPU (Quad-Core 2.4GHz or above) RAM: 16 GB (Host system should have ...
    • GravityZone ERA - Risk Management

      Endpoint Risk Analytics in GravityZone provides an in-depth analysis of vulnerabilities within your IT operations, utilizing Bitdefender’s AI to identify potential risks. Please refer to the link below for recommended fixes for any misconfigurations. ...
    • Bitdefender GravityZone Business Products Comparison

      Hello Team, Below is the Comparison for all Bitdefender GravityZone Business Products. Bitdefender GravityZone Business Products Comparison S.No Features Business Security Business Security Premium Business Security Enterprise (EDR) Business security ...
    • GravityZone Downtime

      Hello Team, We regret to inform you that access to the GravityZone console is temporarily unavailable due to a pre-scheduled update for Bitdefender GravityZone. The update is scheduled to occur from 12:30 AM to 5:30 PM IST. During this period, ...