Refresh Stash sandbox?

Timothy Harris February 11, 2015

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

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2015

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

Timothy Harris February 11, 2015

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.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2015

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

Timothy Harris February 11, 2015

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
TAGS
AUG Leaders

Atlassian Community Events