Is it possible to setup a read-only mirror for Stash?

We have several (100s, set to grow as more are migrated from SVN) developers constantly pushing/pulling to/from Stash. On top of this, we have more than 500 plans that have various triggers, most of them poll the repository for changes every minute. This occassionally causes resource issues on the Stash server until the queue of scm tasks is flushed out.

I worked in other orgs in the past that had a Perforce setup with two servers : one main server where devs pushed their changes, and a read-only mirror server that the build servers pointed to, to prevent any resource issues on the main server. Is this scenario possible with Stash?

1 answer

You have two options:

  1. There are some plugins available for mirroring content to another server. All of these work on the source server and automatically push incoming changes to the mirror. (i.e. they produce some load on your Stash instance, but obviously much less than several jobs pulling changes in parallel.)
  2. You can set up an external job (cron, windows task scheduler, or anything similar; I have it in TeamCity) that pulls changes from your Stash server and pushes them to another remote. [I only use this option because I am mirroring stuff from an external place to our Stash, but for you, probably the other option is better.]

In both cases, you can use a simple network share or a bare-bones Git server (e.g. GitStack) for hosting the mirrors.

Suggest an answer

Log in or Join to answer
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...

698 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot