Restore does not work - The configured JDBC driver, com.mysql.jdbc.Driver, is not available on the classpath

Still need help?

The Atlassian Community is here for you.

Ask the community



Symptoms

Restore can't be executed after running the following command:

$ java -Dbitbucket.home="<path/to/new_bitbucket_home>" -Djdbc.override="false" -jar <path/to/backup/client>/bitbucket-restore-client.jar <path/to/backup/file>/bitbucket-20140107-024714-807.tar


The following appears in the <path/to/backup/client>/log/atlassian-sbc-YYYY-MM-DD-HHMM.log:

2014-01-08 18:14:30,602 ERROR        bitbucket-20140107-024714-807.tar could not be restored. Reason: The configured JDBC driver, com.mysql.jdbc.Driver, is not available on the classpath. Ensure the jar for the driver is present in the "jdbc" directory beneath <path/to/backup/client>. and try again.
com.atlassian.bitbucket.internal.backup.client.RestoreException: The configured JDBC driver, com.mysql.jdbc.Driver, is not available on the classpath. Ensure the jar for the driver is present in the "jdbc" directory beneath <path/to/backup/client>. and try again.
	at com.atlassian.bitbucket.internal.backup.client.DefaultRestoreClient.createDataSource(DefaultRestoreClient.groovy:154) ~[bitbucket-restore-client.jar:1.0.3]
	at com.atlassian.bitbucket.internal.backup.client.DefaultRestoreClient.withDataSource(DefaultRestoreClient.groovy:252) ~[bitbucket-restore-client.jar:1.0.3]
	... 5 more frames available in the log file

Cause

The MySQL JDBC driver is missing from <path/to/backup/client>/jdbc directory.

Resolution

Download the MySQL JDBC driver from the link under the Download and install the JDBC driver section and place it into the <path/to/backup/client>/jdbc.

Make sure that backup-config.properties is configured with jdbc.driver=com.mysql.jdbc.Driver.

Please refer to the Data recovery and backups document for more details on the restore procedure.

If the resolution does not work, please get in touch with Atlassian Support.

Last modified on Dec 5, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.