Burp Suite User Forum

Create new post

How do i restore an automatic backup of internal database on Burp Suite Enterprise?

JAVIER | Last updated: Dec 16, 2021 11:58AM UTC

I dont find the way to restore a backup of embedded database of BurpSuite Enterprise. Thanks in advance.

Maia, PortSwigger Agent | Last updated: Dec 16, 2021 05:13PM UTC

Hi, Can you let us know if you need to restore to a fresh installation or a current installation?

JAVIER | Last updated: Dec 16, 2021 09:57PM UTC

I had to reinstall all, and now I have a fresh installation with the automatic backup: a file script.sql.

Maia, PortSwigger Agent | Last updated: Dec 17, 2021 05:12PM UTC

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.


  1. Stop the burp enterpriseServer, webServer, and agent services. The DB service will need to remain running. https://portswigger.net/burp/documentation/enterprise/infrastructure/services
  2. Extract the database back to a location that is accessible to the burpsuite user
  3. From the command line change to the installation directory:
cd /usr/local/burpsuite_enterprise
  1. Gather the database username and password from the enterprise server config file (enterpriseServer/2021.12.1/enterprise-server.config)
  2. 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

  1. 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

  1. Restart the burp services and connect to the web console to verify that the restore completed successfully

Piero | Last updated: Aug 02, 2023 07:42AM UTC

Hi, how can i do to restore an old backup to a Burp Enterprise Server installed on windows server 2016? Tnx!

Thomas, PortSwigger Agent | Last updated: Aug 02, 2023 12:58PM UTC

Hi, When running the commands in Windows, you will need to open the command prompt and cd to the installation directory. The default installation directory is C:\Program Files\burpsuite_enterprise. You will also need to confirm the location of Java, as this may be located in the jre or jres folder, depending on your version. For example, the command on Windows would be: cd C:\Program Files\burpsuite_enterprise jres\17.0.5\bin\java.exe -cp enterpriseServer\<version>\lib\h2-1.4.197.jar org.h2.tools.Shell You will not need to specify a user when running the command, but you will need to be an administrator or a user that has permission to access the database. You will also need to adjust the location of the SQL script when restoring the backup. On Windows, this will be located in the data directory, which is C:\ProgramData\BurpSuiteEnterpriseEdition\backups by default, but can be confirmed in Burp Suite Enterprise Edition on the Database backups page under the Settings menu.

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.