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
[root@stash data]# ll repositories/
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
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?
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?
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?
Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...
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!
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