Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

restoring stash backup to bitbucket

Kevin Brown February 27, 2018

So some background.  This started as upgrading an stash version from a couple years back to the current bitbucket.  After a couple rounds of related upgrades (git, mysql) I was able to get bitbucket to start however all of my repositories appeared empty.

My assumption was that something went wrong in one of the upgrades and something got detached between git and bitbucket, so my thought was the easiest option might just be to restore my last good backup from stash into bitbucket.

Unfortunately I'm running into problems there.  If I use the original backup/restore client I get a complaint that MySQL 5.7.21 isn't compatible with stash (client 1.5.0).  If I then try to restore using the current (3.3.4) bitbucket restore client I get an error referencing BSERV-8280

BSERV-8280 indicates using 1.9.1 of the backup/restore client which is quite old at this point and also appears to have the same problem as the 1.5 client where it doesn't like the database version.

Any suggestions that aren't too ugly? 

2 answers

1 accepted

0 votes
Answer accepted
Kevin Brown March 5, 2018

We had a second instance of stash that we hadn't been using anymore.  Since that copy was still running the same version of stash we went ahead and restored to there.  

Since we were only keeping the code in this instance for archival purposes that worked out, and we'll just leave the code on that instance.

For the original instance, we just did a complete uninstall/reinstall and started with a clean instance for the active codebase we are preparing to migrate from SVN

0 votes
Dave Theodore [Coyote Creek Consulting]
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2018

It depends on the specific versions, but IIRC, the process is to back up the Stash instance using the old Stash client, the one that is compatible with the version of Stash you're running. Then point the Bitbucket client, the one that is compatible with your Bitbucket version, to the archive and import in to the Bitbucket instance.  You can also import in to a different database technology, but you may need to install the drivers in the client. It's been a while since I did this, but I don't recall it being too painful and I'm 90% sure this is the process that I followed.

Kevin Brown February 28, 2018

Unfortunately with MySQL that doesn't seem to work so well because of version compatibility (for MySQL changing between the two Bitbucket versions).  After upgrading Bitbucket I had to upgrade both MySQL and git due to incompatibilities and the new version of MySQL isn't supported by any of the clients prior to 1.9.1 and since there are two other application databases on the MySQL server I'd rather not keep messing with it's version.

So far I've had the best luck trying to use hsqldb for the restore target, the restore completes successfully but when I try to configure Bitbucket to use the hsqldb it throws an error in the log about not being able to load the driver even though I've dropped the hsqldb driver in the same location I dropped MySQL.  I also attempted to get H2 working for a restore but didn't have any luck there.

My next attempt today I'm going to see if restoring to an azure database will work, but it doesn't look like azure will be supported from the quick search I did this morning.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events