is it possible to restore stash data into new stash version?

I would like to restore stash data in fresh new installation with newer version? 

Thanks

3 answers

Hi Soumia,

Yes, in that case it's possible.

All you need to do is point Stash home to your existing Stash home from Stash 2.4.1 and upon the first initialization, Stash will recognise it as upgrade and begin upgrading process.

Regards,
Deric 

Hi Deric,

Actually, I would like to know if it is possible to restore stash data from backup (stash version 2.4.1), into a new stash installation (version 3.x)

It is an upgrade not a downgrade.

Thank you

0 votes

Hi Soumia,

As Deric said, the answer would be yes. Please read on for more details, though. My answer below is also tied to the answer I posted to you on this question:

  • First off, just to make it clear for other people: you can't use the backup client to backup/restore instances prior to release 2.7.0 as stated on the linked answer. Even if you did, what you described is not applicable (this is explained further)
  • The procedure to backup/restore an instance older than 2.7.0 is described on the answer I linked above.
  • To explain in more details the answer "yes" we need to understand how an upgrade is done in Stash. More details:
    • Upgrade process: before upgrading, always make sure you backup as described in the linked answer. Basically upgrading Stash means downloading a newer binary and pointing its STASH_HOME within setenv (under <Stash_Install_Dir>/bin/setenv<.bat or .sh>) to your current STASH_HOME. As explained by Deric, once the Stash new binaries detect that this STASH_HOME is of an older release, it will silently perform the upgrade for you (on the database and on the file system, wherever and whatever it is required). 
    • Restoring and performing an upgrade on the restored data: we recommend you restore the data using the procedure we described on your previous question. Once you have the data restored, as per my answer, you will have to download Stash. On that answer, I was considering that you will download the Stash binary on the same release as you were using before the backup. If you download Stash binaries on a newer release than it is contained in your backed up STASH_HOME/database and point it to the restored $STASH_HOME, an upgrade will be automatically performed. That should be ok, because if you have problems during this upgrade you can always restore the backup you had again and run with the binaries on the same release as you had before.
  • It is never possible to downgrade Stash. If you point an older binary to a newer STASH_HOME, your instance will not start up.

I hope this is clear enough for you.

Best regards,
Thiago Bomfim
Atlassian Support - DevTools

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

211 views 3 7
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