Backup time: bitbucket backup script

Git is decentralised version control system but let's face it - most likely we use single remote repository. Most likely it's github or bitbucket.

Some people already have learnt the hard way that backups are necessary even for the thing we believe will never break, because, you know, nothing more permanent than temporary.

Recently I was reviewing my backups of important services and noticed that I don't really have a repeatable automated way to archive repositories on Bitbucket. Scaring myself of it I immediately rushed to write a script which does so.

So, requirements for the bitbucket backup script:

  • Must work on Linux(or may be even macos) without any extra dependencies. It must work using only bash + git + tar
  • Created archives should be bz2ipped
  • Backup script must not have write access to the repositories
  • It must include all repositories/teams I was contributing to

Read more