https://github.com/akrck02/github-backup-script
Script for local github backup.
https://github.com/akrck02/github-backup-script
backup-script crontask git github linux
Last synced: 4 months ago
JSON representation
Script for local github backup.
- Host: GitHub
- URL: https://github.com/akrck02/github-backup-script
- Owner: akrck02
- License: mit
- Created: 2022-02-09T00:31:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-02T17:51:56.000Z (over 1 year ago)
- Last Synced: 2025-02-12T07:10:28.673Z (over 1 year ago)
- Topics: backup-script, crontask, git, github, linux
- Language: Go
- Homepage:
- Size: 3.98 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Github backup script
This script will backup your public github repositories to a local directory.
## ¿How to use it?
`Download the script` and place it in a `directory of your choice` and create the following directory:
/path/to/script
├── github-backup-script
└── Resources
├── .env
└── git.json
In the `.env` file, you must place your github username and `the path to the backup directory`.
The `token is optional`, just leave with "" if you don't want to use it.
```.env
github.backup.token=****************
github.backup.path=/your/backup/directory
```
The `git.json` file is used tell the script which repositories you want to backup.
```json
[
{
"username": "github_username",
"repositories": [
"repository1",
"repository2",
"repository3"
]
},
{
"username": "github_username2",
"repositories": [
"repository1"
]
}
]
```
Make the script executable Then, run it:
```bash
chmod +x github-backup-script
./github-backup-script
```
# Github data fetch script
This script will fetch your public Github repository names
and create the `git.json` file for you.
## ¿How to use it?
`Download the script` and place it in a `directory of your choice` and create the following directory:
/path/to/script
├── github-data-fetch
└── Resources
└── .env
In the `.env` file, you must place the `usernames of the accounts you want to backup`.
The `token is not necessary`, just leave with "".
```.env
github.fetch.usernames=akrck02,torvalds
github.fetch.token=****************
github.fetch.json.path=/place/for/git.json/file
```
Make the script executable Then, run it:
```bash
chmod +x github-data-fetch
./github-data-fetch
```