[Stash] How to backup specify repositories in Stash

Hi,

We are using Stash to manage our git repositories, and we just want to backup some of them.

But the repositories are stored in Stash by number, but not repository name. So how to backup specify repositories?

----------------------

[root@stash data]# pwd

/var/atlassian/application-data/stash/data

[root@stash data]# ll repositories/

total 52

drwxrwxr-x 7 stash stash 4096 Aug 13 09:57 1

drwxrwxr-x 7 stash stash 4096 Aug 13 15:32 11

drwxrwxr-x 7 stash stash 4096 Aug 13 15:38 12

drwxrwxr-x 8 stash stash 4096 Aug 19 18:07 13

drwxrwxr-x 7 stash stash 4096 Aug 19 18:01 14

drwxrwxr-x 7 stash stash 4096 Aug 19 18:01 15

drwxrwxr-x 7 stash stash 4096 Aug 19 18:18 16

drwxrwxr-x 7 stash stash 4096 Aug 13 09:57 2

drwxrwxr-x 7 stash stash 4096 Aug 21 17:34 21

drwxrwxr-x 7 stash stash 4096 Aug 21 17:35 22

drwxrwxr-x 8 stash stash 4096 Aug 13 09:57 3

drwxrwxr-x 7 stash stash 4096 Aug 13 09:57 4

drwxrwxr-x 7 stash stash 4096 Aug 13 09:57 5

--------------------------

Thanks!

Br, Wayne

6 answers

This widget could not be displayed.

Hi Wayne,

The https://marketplace.atlassian.com/plugins/com.atlassian.stash.plugin.repository-sysinfo-plugin plugin will give you the repository path on disk which would allow you to map the repository to its internal ID. Note: As of Stash 2.7 that plugin is bundled and doesn't need to be installed explicitly.

Another option would be to use our REST API (https://developer.atlassian.com/static/rest/stash/2.7.0/stash-rest.html) to find out what the internal ID is for the repositories you are interested in.

Does that help or are you looking for something else?

Cheers,

Stefan

This widget could not be displayed.

Thanks!

For sysinfo-plugin, it looks like good.

But my finaly purpose is that i want to back up STASH.

We have some repositories, and some of them are very large and they are not important. so i want to skip those repositories during backup.

And i am only compress those repositories and save to remote server, when i need to restore, if uncompress those repositories and overwrite old directories?

Thanks!

Br, Wayne

Hey Wayne,

For a consistent backup it's important to ensure that the repository contents and the content in the database match.

In Stash 2.7 we released a backup client that solves this consistency problem: https://confluence.atlassian.com/display/STASH/Stash+2.7+release+notes) - have you had a chance to see whether this fits your requirements?

Cheers,

Stefan

This widget could not be displayed.

Hi,

Thanks, i have upgraded to V2.7. I have many repositories managed by Stash.

But we just want to know how to backup some of them (specify)? because of the "stash backup clinet" will backup all repositories by default.

Thanks!

Br, Wei Wang

Unfortunately, the backup client does not support backing up only some repositories (yet).

I would suggest creating a feature request for it in the STASH project on http://jira.atlassian.com.

Cheers,

Michael

This widget could not be displayed.

any update?

This widget could not be displayed.

you can use Mysql query to show name matched ID , as bellow : 1. Check the repository ID: SELECT id FROM repository WHERE name='<reponame>'; 2. If you want list all: SELECT id,name FROM repository WHERE name is not null;

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

237 views 14 2
Join discussion

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