How to Use the DB Rebuild Command in FortiWeb for Database Maintenance

Published on: 09-11-2023 By Nitin Parashar

FortiWeb users, maintaining your appliance's database is crucial for optimal performance and log management. In this guide, you'll learn how to use the db rebuild command to clean and rebuild the FortiWeb appliance’s database for disklog.


The Purpose of db rebuild Command

The db rebuild command is essential for maintaining the health of your FortiWeb appliance's database. By cleaning and rebuilding the database, you can ensure that it remains efficient and free from potential issues that may arise due to log accumulation.


Pre-Requisites and Access Control

Before executing the db rebuild command, make sure that you have the necessary permissions. Your administrator account’s access control profile must have either w or rw permission to the mntgrp area. For more details, refer to the Permissions section in the FortiWeb documentation.


Executing the db rebuild Command

To execute the db rebuild command, follow these steps:

  • Log in to your FortiWeb appliance using an account with the necessary permissions.
  • Run the command execute db rebuild.

It’s important to note that in HA mode, running this command on the master appliance will take effect on all slave appliances simultaneously.


Expectations and Considerations

Depending on the volume of logs stored in the system, the database rebuild process may take a significant amount of time. During this period, new logs will not be immediately available in the GUI as they are postponed to be written to the database. However, all new logs are saved in log files, ensuring that no data is lost.


Conclusion

By utilizing the db rebuild command, you can maintain the efficiency and reliability of your FortiWeb appliance's database. Regular maintenance using this command helps in managing the log accumulation and ensures smooth operation of your FortiWeb system.


Related Topics