Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

bitbucket BACKUP

How to back up all your data Repositories? 

1 answer

0 votes
Caroline R Atlassian Team Jul 28, 2021

Hi, @Денис И! Welcome to the community! 

As Git is a distributed version control, any clone/pull of the repository is essentially a full copy of your code.

As best practice to make backups of your Bitbucket contents, you can create local backups using clones from Bitbucket, more specifically mirror clones as it copies all your repository references locally. You can achieve this by running the following command:

git clone --mirror <repoURL>

The --mirror flag clones all branches and commits of the specified repository. 

Please note that metadata such as settings and Pull requests wouldn't be part of this backup, you would need to re-create this data from scratch if you lost the repository. 

Following our suggestion to clone a repository locally as a mirror, you might have questions on how to turn a mirror repository (bare) into a normal repository (non-bare). For that, you can push the mirror-cloned repository into Bitbucket and then clone it without the mirror flag, it will automatically do that for you. 

With that said, we would like to inform you that we have an open feature request to implement a backup functionality in Bitbucket. You can check this request here: 

Please consider adding yourself as a watcher, this way you get updated as we make progress with this. If you are not familiar with our Feature Request Policy, you can learn more about it here.

I hope this information helps, but please let me know if you have any other questions.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,170 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you