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

Symptoms

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

$ java -Dstash.home="<path/to/new_stash_home>" -Djdbc.override="false" -jar <path/to/backup/client>/stash-restore-client.jar <path/to/backup/file>/stash-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        stash-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.stash.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.stash.internal.backup.client.DefaultRestoreClient.createDataSource(DefaultRestoreClient.groovy:154) ~[stash-restore-client.jar:1.0.3]
	at com.atlassian.stash.internal.backup.client.DefaultRestoreClient.withDataSource(DefaultRestoreClient.groovy:252) ~[stash-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.

For more details on the restore procedure, please refer to the Data recovery and backups document.

Last modified on Apr 5, 2016

Was this helpful?

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