Backup and Restore

How to back up and restore your Open-AudIT database on Linux and Windows, including database reset procedures.

IntermediateUpdated Apr 10, 2026
On this page

Backup and Restore

Your Open-AudIT database is the heart of the system — it contains all your device records, discovery history, credentials, and configuration. Back it up regularly.

What to Back Up

The primary thing to back up is the MySQL/MariaDB database. On Linux, the database is named openaudit. On Windows (XAMPP), it's the same.

Configuration files you may also want to preserve:

  • Apache configuration (/etc/httpd/conf.d/ on RHEL, /etc/apache2/ on Debian/Ubuntu, or the XAMPP equivalent on Windows)
  • Any custom scripts in /usr/local/open-audit/

Backing Up the Database

mysqldump -u openaudit -popenauditpassword openaudit > openaudit_backup_$(date +%Y%m%d).sql
c:\xampp\mysql\bin\mysqldump.exe -u openaudit -popenauditpassword openaudit > openaudit_backup.sql

Restoring the Database

mysql -u openaudit -popenauditpassword openaudit < openaudit_backup.sql
c:\xampp\mysql\bin\mysql.exe -u openaudit -popenauditpassword openaudit < openaudit_backup.sql

Resetting the Database

If you need a clean slate — for example, after testing or a failed migration — you can drop and recreate the database. The Open-AudIT installer will recreate a fresh schema:

mysql -u root -p -e "DROP DATABASE openaudit;"
mysql -u root -p -e "CREATE DATABASE openaudit;"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON openaudit.* TO openaudit@localhost IDENTIFIED BY 'openauditpassword'; FLUSH PRIVILEGES;"
mysql -u root -p openaudit < /usr/local/open-audit/other/open-audit.sql

Danger

Dropping the database deletes all your device records, history, and configuration. Make sure you have a backup before doing this.

Built-In Backup/Restore (Admin Menu)

Open-AudIT also has backup and restore options accessible from within the application under Menu → Admin. These use the same mysqldump approach under the hood and can be useful for quick exports without needing command-line access.

Was this page helpful?