Skip to content

samuelpearce/docker-bitbucket-backup

 
 

Repository files navigation

Bitbucket backup script

A Docker image for backing up your Bitbucket accounts. Use case is for Unraid, but possible from anywhere!

Stolen Inspired with ❤️ from lnxd/docker-github-backup

FYI, this project is a 'search and replace' copy from Github to Bitbucket - Thanks lndx for your hard work!

Getting started

This container contains a script, bitbucket-backup.py, for backing up Bitbucket repositories.

The script requires a Bitbucket App Password and a destination directory. It then uses the token to populate the destination directory with clones of all the repositories the token can access.

It is possible to set it to run on a schedule, and repeated runs only update the already existing backups and add new repositories, if any.

Installation

Installation can be completed via CA on Unraid.

Configuring

Create an App Password (token)

For authorization you need to create a new personal Bitbucket App Password. You can do this from this page.

Step 1

When you click the Create App password button, you enter the token creation screen. Here you should give the token a descriptive name and choose its scopes, which basically determine what the token is allowed to do.

Step 2

Select the Repositories > Read scope

Step 3

After clicking the Create button you're presented with the generated token. Remember to store it now, as Bitbucket won't show it to you anymore!

Final notes

If you notice any bugs, feel free to open an Issue or a pull request. We'll see how popular the plugin is. Maybe I'll create a topic on the Unraid forums...

About

A backup script for Bitbucket repositories

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 64.8%
  • Shell 19.5%
  • Dockerfile 15.7%