Forums

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

bitbucket holds many repos for me. How can I efficiently back them up?

John Arrizza
Contributor
November 11, 2025

I have around 150 repos (yes, working hard to delete/clean up as many as I can).

Of the remaining ones, I'd would like to back those up on a local drive in case something bad happens to Atlassian or I lose access for some reason.

These repos represent about 30 or more years for hobby fun for me, so they are important (to me!)

1 answer

0 votes
Shwetha Suvarna
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 16, 2025

Hi @John Arrizza 

Welcome To Community…

I understand that you want to get informed about data backup in Bitbucket Cloud. To answer your questions, Bitbucket Cloud takes hourly snapshots of all existing repositories across the entire platform. This means that every hour, GM+0, we will have an exact copy of your repository.

  • However, when new snapshots are created, the old ones get deleted to open more space for the new ones, and this purging takes place after 7 days

  • This means that we'll have backup snapshots of each repository for 7 days if it gets deleted, and for 7 days, different versions can exist as well, since the changes that are made are stored on the new snapshots

  • In case of disasters or mistaken deletion, please check out this documentation for more information about the recovery and backup repos, https://support.atlassian.com/bitbucket-cloud/docs/does-bitbucket-backup-my-repositories/ .

However, in case you want to have backup repositories locally, we advise you to make a bare clone of your repository in a new directory to save its state with the following steps:

  1. You can run the following command to get a list of repositories under your account

  2. Filter the JSON format output to get the repo slug

  3. Use the repo slug to proceed with the "git clone --mirror <REMOTE_URL>"
    You may refer to this as an example:
    https://bitbucket.org/rtest123/repo-backup-script/src/master/account_repo_backup.sh

Please do note that we don't normally assist with creating a script for users as it's not part of our support scope - Atlassian Support Offerings - Atlassian Documentation

Additionally, there is an ongoing feature request that addresses your request. Please let me share it with you through the following link: https://jira.atlassian.com/browse/BCLOUD-19817. Feel free to vote for it, as this will expedite the delivery process, and also add yourself as a watcher to receive any updates.

 

Best regards,
Shwetha Suvarna

John Arrizza
Contributor
November 24, 2025

Thanks.

I've already got an python script using the v2 API interface. I'll tweak it to dump out the full URL list and then I'll try out the git mirror for each of those.

from atlassian.bitbucket import Cloud

Suggest an answer

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

Atlassian Community Events