Golden Codes - armanexplorer planet

Practical code snippets for Django, Python, Bash, Git and All!

View on GitHub

Docs

Omnibus-Docs

backup applicatoin

docker exec -t <your container name> gitlab-backup

backup config

docker exec -t <your container name> /bin/sh -c 'gitlab-ctl backup-etc && cd /etc/gitlab/config_backup && cp $(ls -t | head -n1) /secret/gitlab/backups/'

# or more simply (warn: you should take care of the secrets as above do!):
docker exec -t <your container name> gitlab-ctl backup-etc

Upload backups to remote

Configure cron to make daily backups

Prune old backups