Delete old backups from gitlab

Hi, the config backups are deleted after the time set in /etc/gitlab/gitlab.rb by this value:

gitlab_rails['backup_keep_time'] = 604800

since this is in seconds, I think that is about 7 days. So it should delete. Otherwise, you can use a script like in this post: Remove files at /var/opt/gitlab/backups - #2 by iwalker

Effectively from that script just change this line:

GITLABBACKUPS=/var/opt/gitlab/backups

so change /var/opt/gitlab/backups to /etc/gitlab/config_backup and then run the script once a week or daily.

2 Likes