Hi,
You can use the following process to restore the database backup. Please note that you will need to have installed the same BSEE version that the backup was made from. If you do not use the same version then it may result in the enterprise server service not starting correctly and you will likely see a database mismatch showing in the enterprise server log. The example commands below presume the latest version (v2021.12.1) on Linux, therefore you may need to adjust the commands if you are using a different version or OS.
- Stop the burp enterpriseServer, webServer, and agent services. The DB service will need to remain running. https://portswigger.net/burp/documentation/enterprise/infrastructure/services
- Extract the database back to a location that is accessible to the burpsuite user
- From the command line change to the installation directory:
cd /usr/local/burpsuite_enterprise
- Gather the database username and password from the enterprise server config file (enterpriseServer/2021.12.1/enterprise-server.config)
- Run the following command to access the database:
sudo -u burpsuite jre/bin/java -cp enterpriseServer/2021.12.1/lib/h2-1.4.197.jar org.h2.tools.Shell
Welcome to H2 Shell 1.4.197 (2018-03-18)
Exit with Ctrl+C
[Enter] jdbc:h2:~/test
URL jdbc:h2:tcp://127.0.0.1/./burpsuiteenterpriseedition_db
[Enter] org.h2.Driver
Driver
[Enter]
User burp_enterprise
[Enter] Hide
Password A********Z
Connected
Commands are case insensitive; SQL statements end with ';'
help or ? Display this help
list Toggle result list / stack trace mode
maxwidth Set maximum column width (default is 100)
autocommit Enable or disable autocommit
history Show the last 20 statements
quit or exit Close the connection and exit
- Run the following commands to clear the database and then restore from the backup:
sql> drop all objects;
sql> runscript from '/var/lib/BurpSuiteEnterpriseEdition/backups/script.sql';
sql> exit
- Restart the burp services and connect to the web console to verify that the restore completed successfully