I have created gitlab group in gitlab.com(not in local gitlab instance) and have set of project in it.I just needed to take daily backup of entire group repositories using runing a script in my local ubuntu machine.How can I do this??Any suggestions???
Asked
Active
Viewed 861 times
2
-
1Have you tried CRON or anything else? – Nergal Jul 18 '18 at 18:58
-
Hi @Nergal I can create cron job for daily backup thing.But the problem is I couldn’t found the command to take direct backup of my repo group from gitlab.com. Thanks for the response. I am looking an answer for this due the urgent matter. – JohnC Jul 18 '18 at 19:07
-
Depending on what you trying to do maybe you should look into `git clone --mirror`, Read more about it [here](https://help.github.com/articles/duplicating-a-repository/#mirroring-a-repository-in-another-location). – Nergal Jul 18 '18 at 19:18
-
@Nergal Thanks for the answer. I used mirror thing before for cloning and push new location by using the below commands “git clone —mirror git_project_url. The thing is this command I have to run separately for all the repositories. I am checking mirroring the whole group but it not allows because of the group name not identified as .git. Any suggestions for taking whole group instead of getting one by one . Thanks again – JohnC Jul 18 '18 at 19:38
-
For that you can try to use the [GitLab API](https://docs.gitlab.com/ee/api/projects.html) and write a small python script to iterate through the response like [this](https://stackoverflow.com/a/31792095/2231168). – Nergal Jul 18 '18 at 19:45
-
@Nergal Thank you buddy. I’ll try it – JohnC Jul 19 '18 at 00:41