Page MenuHomePhabricator

WARNING: In GitLab 14.0 we will begin removing all configuration backups older than yourgitlab_rails['backup_keep_time'] setting (currently set to: 259200)
Closed, ResolvedPublic

Description

The following WARNING is being sent to all root inboxes:

Cron <root@gitlab1001> /usr/bin/gitlab-ctl backup-etc >/dev/null && (find /etc/gitlab/config_backup/ -maxdepth 1 -type f -name 'gitlab_config*.tar' -mtime +6 | xargs -d '\n' -r rm --) && ls -t /etc/gitlab/config_backup/gitlab_config*.tar | head -n1 | xargs -i cp {} /etc/gitlab/config_backup/latest/latest.tar

WARNING: In GitLab 14.0 we will begin removing all configuration backups older than yourgitlab_rails['backup_keep_time'] setting (currently set to: 259200)

Event Timeline

Change 710529 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/gitlab-ansible@master] remove backup warning for config backups

https://gerrit.wikimedia.org/r/710529

Change 710529 merged by Brennen Bearnes:

[operations/gitlab-ansible@master] remove backup warning for config backups

https://gerrit.wikimedia.org/r/710529

Mentioned in SAL (#wikimedia-operations) [2021-08-06T17:39:01Z] <brennen> gitlab: run ansible to apply [[gerrit:710529|remove backup warning for config backups]] (T288324)

Change 710676 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/gitlab-ansible@master] fix shell for backup cronjob

https://gerrit.wikimedia.org/r/710676

We now get:

Cron <root@gitlab1001> /usr/bin/gitlab-ctl backup-etc 2> >(grep -v "In GitLab 14.0 we will begin removing all configuration backups") >/dev/null && (find /etc/gitlab/config_backup/ -maxdepth 1 -type f -name 'gitlab_config*.tar' -mtime +6 | xargs -d '\n' -r rm --) && ls -t /etc/gitlab/config_backup/gitlab_config*.tar | head -n1 | xargs -i cp {} /etc/gitlab/config_backup/latest/latest.tar

/bin/sh: 1: Syntax error: redirection unexpected

Change 710676 merged by Brennen Bearnes:

[operations/gitlab-ansible@master] fix shell for backup cronjob

https://gerrit.wikimedia.org/r/710676

Mentioned in SAL (#wikimedia-operations) [2021-08-10T16:25:20Z] <brennen> gitlab: run ansible to apply [[gerrit:710676|fix shell for backup cronjob]] (T288324)

Should be fixed with https://gerrit.wikimedia.org/r/710676. No new error message from root@gitlab1001

brennen added a project: User-brennen.

The unnecessary grep here should probably be removed once we upgrade to 14.x. Leaving this open for the time being.

Change 719930 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/puppet@production] gitlab::backup remove deprication warning and deletion of config backup

https://gerrit.wikimedia.org/r/719930

Change 719930 merged by Jelto:

[operations/puppet@production] gitlab::backup remove deprication warning and deletion of config backup

https://gerrit.wikimedia.org/r/719930

Change 720316 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/puppet@production] gitlab::backup make config backup less verbose

https://gerrit.wikimedia.org/r/720316

The warning was removed in the GitLab upgrade to 14.x (https://phabricator.wikimedia.org/T289802.) The grep was removed in https://gerrit.wikimedia.org/r/719930. So I'm closing this issue.
Feel free to open again.

Change 720316 abandoned by Jelto:

[operations/puppet@production] gitlab::backup make config backup less verbose

Reason:

change not needed

https://gerrit.wikimedia.org/r/720316