Stash Upgrade 2.0.3 -> 2.1 - database table clash?

Hi all,

I've just downloaded the latest Stash version 2.1.1 and am in the process of migrating my data from Stash 2.0.3. The old installation used an external database. When I specify that database in the Migrate Database dialog, I get this errorr:

The target database contains tables which will clash with Stash's tables. For information about how to clean up your databases for use with Stash, please refer to the Stash documentation.

I also tried starting with a new database from scratch but can't find a way to migrate from my existing database to the new one. Atlassians upgrade guide states:

You can use the Database Migration Wizard to migrate Stash from the embedded database to an external database, or from an external database to another external database

However, I can' t figure out how to actually do the migration from the old db to the new one using the migration assistant. I'd be really grateful for any help you might be able to give.

Thanks in advance,

Georg

1 answer

1 accepted

5 votes

Georg,

When you upgrade to a new Stash version, you can keep using the same STASH_HOME and database. There is no need to migrate your data from the external database.

Please have a look at the upgrade guide - https://confluence.atlassian.com/display/STASH/Stash+upgrade+guide.

Thanks Michael, that helped. One thing I still don't understand, though, is how I can migrate data from one db to another, as your guides state.

I tried with a fresh install (only internal database) and the upgrade worked like charm. Not sure yet why it didn't work at my workplace. Another mistake I made was to set STASH_HOME to the actual server directory. It it possible to move the content that STASH_HOME points to to a new directory, change setenv.sh to point to it and run again? I'm referring to the info in this document:

https://confluence.atlassian.com/display/STASH/Stash+home+directory

You can migrate data from one (e.g. embedded) db to another (external) db through Admin > Database > Migrate Database. This will move the data in the database to your new database and will update the Stash configuration in STASH_HOME/stash-config.properties to link to the new database.

When you upgrade Stash and you update the setenv.sh of the _new_ Stash version to configure your STASH_HOME (using your exisiting STASH_HOME), Stash will automatically connect to the existing database (through settings in stash-config.properties) and there should be no need to migrate the database.

However, if you start up the _new_ Stash version pointing to another STASH_HOME, Stash will initialize and run against an internal database. If you then try to migrate to your already existing database, Stash tries to migrate the data from the (nearly empty) embedded database to your already exisiting external database. It finds the tables that were used by your _old_ Stash installation and will not migrate the data.

If you want to move your STASH_HOME, you can simply move the directory and update setenv.sh and everything should work.

Thanks again for the detailed info, Michael. Good to see that Atlassian support is as great as their products!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

189 views 4 8
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