Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maxking/gbackup

A backup utility for Gitlab projects
https://github.com/maxking/gbackup

backup gitlab

Last synced: 2 months ago
JSON representation

A backup utility for Gitlab projects

Awesome Lists containing this project

README

        

gbackup
==========

A utility to backup all [Gitlab](https://gitlab.com) projects of a user or
group. It can download projects of multiple groups and users.

# Requirements

This requires `python-gitlab` package and requires Python 3.5+.

# Setup

These setup requirements will setup a python
[virtualenv](https://virtualenv.pypa.io/en/latest/) to run the script which
backs up all your projects.

First, setup a config file with your access credentials. `user` and `group` are
optional, you can specify whichever one you want to backup.

```
# ~/.gbackup.ini
[gitlab.com]
type = gitlab
server = https://gitlab.com
token =
group =



user =

backup_dir = ~/.gitlab-backup
```

Now, let's setup [virtualenv]((https://virtualenv.pypa.io/en/latest/)) and start
backup.

```bash
$ git clone https://github.com/maxking/gbackup
$ cd gbackup
$ python3 -m venv gitlab
$ source gitlab/bin/activate
(gitlab)$ python setup.py install
```

# Usage

Finally, to start the backup, run the `gbackup.py` script.

```
$ ./gbackup.py
Downloading backup for https://gitlab.com/maxking/mailman to /home/maxking/.gitlab-backup/gitlab.com/maxking/mailman/11-Jan-2019-19-53.tar.gz
```

# License

All the contents of this repository is licensed under Apache License
v2.0. Please see the LICENSE file for complete license text.