Error with Backup/Restore Stash 2.10.1 -> 2.12.1

I followed the Stash backup-restore document and I'm running into an issue with the database schema. I did a backup of version 2.10.1 and I restored the data into a newer version 2.12.1 then ran the startup script. I went to the servername:port/setup to connect to our oracle database and it gave me the below error.


The Hibernate SessionFactory could not be created. The database schema may not have been correctly applied





Missing column: is_active in JIRA.CWD_APPLICATION





Is there a reason it is looking for Jira.cwd_application? Just a note, we also have Jira DB running on the same server as Stash DB, but I checked the user and the database and they look fine. Is there an error with either the backup/restore or the initial setup page in Stash?

DB Properties File:


#> Migrated to database at jdbc:oracle:thin:@//asdbsxxxxxxx:port/stash_dev

#> Updated by StashAdmin on 2014-01-02T09:39:53.326-05:00







#> Overridden during restore from backup by stashuser on Apr 22, 2014 8:54:56 AM






3 answers

We are having the same issue too. Just installed stash and then when restarting it wouldn't start up. I cleared out the database and the stash home directory, pulled down the latest (2.12.2) and it crashed with the same message during database setup.

We also have a JIRA databse on the same server that is registered under the JIRA user which may be causing trouble.

I received a response through Atlassian support on the issue. It seems like it's directly related to using the backup client on Stash 2.10.

"We have not established the root cause of the upgrade failure. The failure was on the SQL side RE the Answers post

Caused by: liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE `atlassian_stash`.`sta_cmt_discussion` ADD CONSTRAINT `fk_sta_cmt_disc_repo` FOREIGN KEY (`repository_id`) REFERENCES `atlassian_stash`.`repository` (`id`) ON DELETE CASCADE: Can't create table 'atlassian_stash.#sql-2eb1_7462' (errno: 121)

The latest backup client version 1.2.1 will work with Stash 2.11.2 - 2.12.2 .

See this page for updates:


The answer turned out to be that the database needs a unique service.

Incorrect: jdbc.url=jdbc:oracle:thin:@//asdxxxxxxx:port/CSD11UTF

Correct: jdbc:oracle:thin:@//asdbsxxxxxxx:port/stash_dev

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

255 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you