-
-
Save rajamodu/7cb5cea29f62079e4109d938337fb658 to your computer and use it in GitHub Desktop.
Omnibus Gitlab backup cronjob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Crontab | |
| # once per week backup, move to "/backup" gzip it, delete everything but the latest 5 files | |
| 0 4 * * 1 /opt/gitlab/bin/gitlab-ci-rake gitlab:backup:create CRON=1 && mv /var/opt/gitlab/backups/* /backup/ && cd /backup && gzip *.tar && rm `ls -t | awk 'NR>5'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment