Skip to content

Instantly share code, notes, and snippets.

@abdennour
Last active December 15, 2018 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdennour/a64baccf6264ac56d4aed092bb265d85 to your computer and use it in GitHub Desktop.
Save abdennour/a64baccf6264ac56d4aed092bb265d85 to your computer and use it in GitHub Desktop.
Bitbucket Full Backup of GIT Repositories
#!/bin/bash
pip install oauthlib
pip install https://github.com/samkuehn/bitbucket-backup/archive/master.zip
#!/bin/bash
TEAM=someteam
EMAIL=mybitemail@email.com
PASSWORD=jKl4DS
BACKUP_DIST=~/repos
LOGS_DIST=~/logs
mkdir -p $BACKUP_DIST
mkdir -p $LOGS_DIST
# Take backup
bitbucket-backup -u $EMAIL -l $BACKUP_DIST \
-t $TEAM \
-p $PASSWORD --mirror >> ${LOGS_DIST}/$(date +"%Y-%m-%d").log
# which bitbucket-backup => ~/.local/bin/bitbucket-backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment