https://github.com/stephane-klein/clean-gitlab-backup
docker-image to keep only x GitLab backup in S3 compatible Object Storage.
https://github.com/stephane-klein/clean-gitlab-backup
backup docker gitlab
Last synced: 3 months ago
JSON representation
docker-image to keep only x GitLab backup in S3 compatible Object Storage.
- Host: GitHub
- URL: https://github.com/stephane-klein/clean-gitlab-backup
- Owner: stephane-klein
- Created: 2020-03-14T14:01:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-14T14:19:00.000Z (over 6 years ago)
- Last Synced: 2025-01-28T11:31:10.890Z (over 1 year ago)
- Topics: backup, docker, gitlab
- 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
# Keep only x GitLab backup in S3 compatible Object Storage
docker-image to keep only x GitLab backup in S3 compatible Object Storage.
This tool will be unnecessary when [GitLab Issue #26246](https://gitlab.com/gitlab-org/gitlab/-/issues/26246) will be closed.
## How to use it
Put this content to `docker-compose.yml` and fill variable env values:
```
version: '3.7'
services:
clean-gitlab-backup:
image: stephaneklein/clean-gitlab-backup
environment:
START_EVERY_DAY_AT_UTC: '02:00'
NUMBER_BACKUP_TO_KEEP: 2
S3_REGION_NAME: 'fr-par'
S3_ENDPOINT_URL: https://s3.fr-par.scw.cloud
S3_AWS_ACCESS_KEY_ID: ....
S3_AWS_SECRET_ACCESS_KEY: ....
S3_BUCKET_NAME: ...
```
Start it:
```
$ docker-compose up -d
$ docker-compose logs -f
2020-03-14 13:54:08,343 [INFO] clean-gitlab-backup started: Running job Every 1 day at 02:00 UTC
2020-03-14 13:55:00,454 [INFO] Start GitLab old backup cleaning...
2020-03-14 13:55:00,649 [INFO] GitLab old backup clean done
```
## How to contribute
```
$ git clone git@github.com:stephane-klein/clean-gitlab-backup.git
$ cd clean-gitlab-backup
$ docker-compose up -d
$ docker-compose exec clean-gitlab-backup bash
# /src/main.py
```
Now you can update `main.py` file.