Restore fails with password authentication failed for user

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Restore can't be executed. The following appears in the <path/to/backup/client>/log/atlassian-sbc-YYYY-MM-DD-HHMM.log:

1 2 3 4 5 6 7 8 9 10 2014-01-11 23:25:11,785 INFO Initializing 2014-01-11 23:25:15,130 INFO Unpacking bitbucket-20140111-231408-003.tar to /opt/bitbucket-home 2014-01-11 23:31:21,378 INFO Validating database before restore 2014-01-11 23:31:21,718 ERROR bitbucket-20140111-231408-003.tar could not be restored. Reason: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: password authentication failed for user "bitbucketuser" org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: password authentication failed for user "bitbucketuser" at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) ~[spring-jdbc-3.2.4.RELEASE.jar:3.2.4.RELEASE] at com.atlassian.bitbucket.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:35) ~[bitbucket-dao-impl-2.9.0-m2.jar:na] ... 7 more frames available in the log file

Cause

The new database you are trying to restore Bitbucket Server into was created with a different username/password from the previous database

Resolution

The backup client needs the new database to be totally clean and configured just like the first installation of Bitbucket Server as described on each of different database types of the Connect Bitbucket to an external database document.

If you are restoring Bitbucket Server to a new database and you have different user/password, please make sure you specify the jdbc.override parameter and all the other jdbc parameters as described in 2023-10-24_01-30-41_Bitbucket Server Backup Client are passed during the restore.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.