Refresh Stash sandbox?

I have a sandbox environment for Stash. I am wondering what the easiest way to refresh it from our production environment is?

In JIRA I can just do an XML dump and import it into the Sandbox instance. Nice an easy, just have to update application links, license, etc.

The stash version is 3.3.

 

1 answer

Read this page about migrating Stash instances. You can use some subset of these steps to do what you want.

To be honest, I find this documentation a bit confusing. The way I read it, please correct me if I am wrong, is that the sections that pertains to me is section 2 "Migrating Stash Data to a different machine". The database for the Sandbox is an external MySQL db, which is the same for production just on a different MySQL server. So I think I have to do the following. * Do a mysqldump of the *production* database. * Backup the *production* HOME directory(tar and zip). This is "/var/atlassian/application-data/stash" in my case. * Shut down stash on the *sandbox* server. * Do a mysqldump on the database for the *sandbox*. Just in case. * Backup the *sandbox* stash HOME directory(tar and zip). Just in case. * Restore the *production* mysqldump file to the *sandbox* database. * Move/rename the *sandbox* HOME directory. * Extract the *production* HOME directory to the *sandbox* HOME directory. * Restart stash on *sandbox*. Seems all a bit complex :-( I think it could be made simpler if Stash provided an export/import functionality like JIRA for the database.

Yes, this seems about correct. I agree that it could be simpler. (Most people don't do this too often.)

Well there is one more VERY important step to add. Doing it the way I described above you need to make sure you update the stash-config.properties file and change the JDBC connection properties as they point to PRODUCTION database.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,039 views 1 5
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