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
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;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.