Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/infra-blue/github-repo-backup
Containerized python script that automatically backup a user's public repositories
https://github.com/infra-blue/github-repo-backup
Last synced: about 2 months ago
JSON representation
Containerized python script that automatically backup a user's public repositories
- Host: GitHub
- URL: https://github.com/infra-blue/github-repo-backup
- Owner: infra-blue
- License: wtfpl
- Created: 2023-11-10T16:28:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-11T21:45:46.000Z (about 1 year ago)
- Last Synced: 2024-10-15T03:25:05.006Z (3 months ago)
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-repo-backup
![wtfpl](http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-2.png "LICENCE")#### Features
- Auto backup your repos easily
- A fork of [this](https://gist.github.com/Vulcalien/b631e1fe471a6baf07f1943f70434657)## Running with Docker
#### Using Docker Compose```yaml
version: '2'
services:
github-repo-backup:
image: ghcr.io/infra-blue/github-repo-backup:main
container_name: github-repo-backup
volumes:
- "path-to-your-settings.yaml" : /github-repo-backup/config/settings.yaml
- "path-to-your-backup-folder" : /github-repo-backup/backup
restart: unless-stopped```
#### Building and running locally1. Clone the repository:
```bash
$ git clone [email protected]:infra-blue/github-repo-backup.git
```
2. Make a copy of `config/settings.yaml.dist` and rename it to `config/settings.yaml`.
3. Change `user` field with your github username
4. You can even change `skip_forks` field and `auto-update-time` field (in minutes)
5. Build the image:
```bash
$ cd github-repo-backup
$ docker build -t github-repo-backup .
```
6. Run:- On Windows:
```bash
$ docker run -v "C:\path\to\your\settings.yaml":"/github-repo-backup/config/settings.yaml" -v "C:\path-to-your-backup-folder":"/github-repo-backup/backup" github-repo-backup
```
- On Linux:
```bash
$ docker run -v "/path/to/your/settings.yaml":"/github-repo-backup/config/settings.yaml" -v "path-to-your-backup-folder":"/github-repo-backup/backup" github-repo-backup
```### Pull image from remote repository and run
```bash
$ docker run --name github-repo-backup -v "/local/path/to/settings.yaml":"/github-repo-backup/config/settings.yaml" -v "path-to-your-backup-folder":"/github-repo-backup/backup" -t ghcr.io/infra-blue/github-repo-backup:main
```### Running Natively
1. Clone this repository.
2. Copy `config/settings.yaml.dist` to `config/settings.yaml`.
3. Change `user` field with your github username
4. You can even change `skip_forks` field and `auto-update-time` field (in minutes)
5. Execute:
```bash
$ python main.py
```### Credits
- [Leonardo Mirabella](https://github.com/infra-blue)
- [Vulcalien](https://github.com/Vulcalien)