Gitlab auto backup and apt-get

So hope that I am not double posting this I have tried searching for a simple answer.

I am just trying to find out is running apt-get upgrade preforms an auto backup even if NO gitlab stuff is getting updated in any way?

The documentation says if you use apt to upgrade your gitlab it backs up but we have a backup running weekly and can not find a cron that would do this. we do have a ansible preforming updates so I am trying to see if this is causing the auto backup to trigger.

Not looking for tech support or help fixing anything.

Can you share the URL? To my knowledge, the Omnibus packages create a database backup, which you can configure to be skipped. Although, I advise to keep them for rollbacks.

1 Like

That’s the issue we can not figure out how “apt-get upgrade” is generating backups, uploading them to S3 and not deleting them filling the drive and crashing our gitlab.
The documentation does not say how its hooked and if there is a way to disable so we can manually execute them.

apt-get upgrade should only run a backup if a new version is detected and installed. Note that this will only backup the database (any no other GitLab data), by default. New versions of GitLab are released several times a month.

To avoid having this happen, you can create an empty file at /etc/gitlab/skip-auto-backup with sudo touch /etc/gitlab/skip-auto-backup.

If any of the following are happening:

  • running apt-get upgrade is executing gitlab-backup create
  • running apt-get upgrade is triggering a database backup even when no new release is found
  • a full backup is created (more than just the database)

the source of these backups is not related to or caused by functionality in the GitLab software or package installer.

You can verify whether the backup was created as part of a GitLab version upgrade by running the following command:

tar -tvf <backup_archive>.tar.gz

If this returns anything other than:

drwxr-xr-x git/git           0 2022-03-11 22:47 db/
-rw------- git/git      440335 2022-03-11 22:47 db/database.sql.gz
-rw-r--r-- git/git         290 2022-03-11 22:47 backup_information.yml

Then this backup was not created as part of a GitLab version upgrade.

/var/log/apt/history.log and /var/log/gitlab/reconfigure will also capture data anytime that GitLab is upgraded.

If any of the above are true, I’d check the following places for what’s triggering the backup:

  • your ansible playbook
  • cronjobs on the system
1 Like