Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tdiprima/gitbak
GitHub Backup
https://github.com/tdiprima/gitbak
backup-script backup-tool github-api shell-scripting
Last synced: 14 days ago
JSON representation
GitHub Backup
- Host: GitHub
- URL: https://github.com/tdiprima/gitbak
- Owner: tdiprima
- Created: 2019-09-04T13:32:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-17T20:03:08.000Z (23 days ago)
- Last Synced: 2024-12-17T21:17:57.301Z (23 days ago)
- Topics: backup-script, backup-tool, github-api, shell-scripting
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Backup
Back up all your repositories.
(I believe I modified it from [this script](https://github.com/tango-controls/GitHubBackup/blob/master/backup-github.sh). Or you could check [The complete list of every GitHub backup script](https://rewind.com/blog/every-github-backup-script-complete-list/) 😄)
The script has a mechanism to prune old backups based on their age. It prunes files older than a specified number of days (`GHBU_PRUNE_AFTER_N_DAYS`).
## Usage
Use `./backup-github.sh`
Switch to the correct endpoint for users or organizations:
`GHBU_ORG_TYPE=${GHBU_ORG_TYPE-"users | orgs"}`
Export your github token:
`export GHBU_TOKEN=your_github_token_here`
## SSH Key
It is necessary to set up an SSH key to connect to GitHub.
### See:
* [Connecting To GitHub With SSH](https://help.github.com/articles/connecting-to-github-with-ssh/)
* [Adding a New SSH Key to Your GitHub Account](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/)