https://github.com/johnbedeir/github-backup-script
This script is to backup github
https://github.com/johnbedeir/github-backup-script
Last synced: about 1 year ago
JSON representation
This script is to backup github
- Host: GitHub
- URL: https://github.com/johnbedeir/github-backup-script
- Owner: johnbedeir
- Created: 2022-04-19T20:12:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-19T20:20:59.000Z (about 4 years ago)
- Last Synced: 2025-02-13T01:29:45.267Z (over 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub backup script
The script requires a GitHub token and a destination directory. It then uses the token to populate the destination directory with clones of all the repositories the token can access.
Repeated runs only update the already existing backups and add new repositories, if any.
## Step 1: Installation
Install the required Python dependencies using `pip3`:
```
$ pip3 install -r requirements.txt
```
## Step 2: Configuring
### Create a token
For authorization you need to create a new personal GitHub token. You can do this from the GitHub settings, under the **Personal Access Tokens** tab.
### Create a configuration file
To run the script you need a JSON configuration file. For an example see the included file `config.json.example`.
```
{
"token": "ADD-TOKEN-HERE",
"directory": "~/backup/"
}
```
## Step 3: Run the Script
```
$ python3 backup.py config.json
```