Stash backup

mike brosnan February 28, 2014
I've tested the backup client, is there a way to control how long the backup will take? Is there a benchmark figure for a 100gb set of repositories? If oracle data guard is used, can I run stash against the database copy? I am concerned about how long we lock out users as the size of the repos grow Thanks Mike Brosnan

1 answer

1 accepted

0 votes
Answer accepted
EddieW
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 28, 2014

Stash doesn't store the actual repos in the database. All git repos are stored to disk in <STASH_HOME>/data.

https://confluence.atlassian.com/display/STASH/Stash+home+directory#Stashhomedirectory-Abouttherepositories

data contains the Git repositories being managed by Stash

With all atlassian products, there are 3 pieces that must be restored

* isntall_directory (important for custom seraph, crowd, and other config)

* data_directory (repos, attachments, avatars, etc)

* database (projects, users, logins, settings, etc)

To speed up the disk based backup of STASH_HOME, I would suggest a utility like rsync *instead of the stash backup client* to inteliigently replicate only the difference/changes since the last backup. This will be much faster then the client which creates a full, new tar based on all the existing repos. Rsync uses compression as well and is intended to push the differences to a remote machine. So you can effectively maintain a "warm" standby instance using rsync in combo with data guard for the event of an outage/incident.

*Stash should be locked/shutdown during backups* You can't redirect users to a backup while one is down.

The DB backup should be very quick itself, as well as the install directory, as they will both remain small, even with 100+G of repos/.

cofarrell
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 28, 2014

In addition to Eddie's points, you might want to look at related answers floating around:

https://answers.atlassian.com/questions/234680/backup-stash-without-repositories

https://answers.atlassian.com/questions/218480/stash-backup-client

The important thing to keep in mind is that it's possible that you may only partially backup a repository if people are pushing updates. For example you might get an old pack file but new refs and the repository is now effectively "corrupted" if you try to restore.

We're currently working on improving the Backup experience to support rsync for faster backups, but it's too soon to announce anything yet.

Roger Barnes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2014

Since Stash 2.12 there is now a "DIY Backup" option that lets you use the faster snapshot/sync tools that your database and filesystem provide. For more, see https://confluence.atlassian.com/display/STASH/Using+Stash+DIY+Backup

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events