Last active
December 15, 2018 03:33
-
-
Save abdennour/a64baccf6264ac56d4aed092bb265d85 to your computer and use it in GitHub Desktop.
Bitbucket Full Backup of GIT Repositories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pip install oauthlib | |
pip install https://github.com/samkuehn/bitbucket-backup/archive/master.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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