Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script to pull a local copy of all repos in a workspace

Chris Mann
Contributor
March 1, 2023

Being forced to move up to the cloud bitbucket offering, I want a script to ensure all repos from a cloud bitbucket workspace are regularly pulled to our local server where we can run a full backup.

Can anyone help provide a (windows) script to do this? Or a script we could run on our local bamboo build server to ensure a regular local copy is retained.

It would need to pull all repo's based on the workspace and I would prefer not to have to manually add a new pull each time a new project or repo is created.

Thanks!

2 answers

0 votes
Chris Mann
Contributor
March 2, 2023

Thanks for the feedback.
For now, I have gone with a slightly different tool:

SCM Backup: SCM Backup (scm-backup.org)

Seems to do what I need (for now) although I am starting to realise that like most remote hosting, having to move our Bitbucket, Jira and Confluence to the hosted cloud offering is definately NOT cheaper than self-hosting!

0 votes
Maria Korolenko
Contributor
March 1, 2023

Hi Chris! 

To run Bitbucket backups, you can do the following: 

1. Using git clone Command-line Script. To use this command, you must have Git installed on your terminal. You can read more about it here.

2. You can use bbbackup. It's used as a backup solution for cloud-to-local repository cloning. It’s written in Python, which means to use it you need to have Python installed on your machine.

3. You can use third-party automated and compliant backups like Rewind that are compatible with Atlassian's shared responsibility model

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events