Why is the difference in size of .tar backup files between "sudo gitlab-backup create" and backup created during Upgrade process?

I don’t understand what is the difference between the backup crated by command “sudo gitlab-backup create” and the backup created by the process of backup when I am upgrading my Gitlab server.

The difference in .tar files is huge, for example I can see the tar files after an upgrade and the size is 279Mb and when I run “sudo gitlab-backup create” the .tar file is 11.2Gb

Why?? My worry is because backup created during the backup process is missing something I would like to fix this ASAP.

Thanks for any help.

The backup created during the upgrade is only a DB and configuration backup. This is why it varies in size. It does mention this in the output during the upgrade process from what I remember.

Yep, this is how the output looks during upgrade:

gitlab preinstall: Automatically backing up only the GitLab SQL database (excluding everything else!)
2024-01-12 10:12:18 UTC -- Dumping database ... 
Dumping PostgreSQL database gitlabhq_production ... [DONE]
2024-01-12 10:12:28 UTC -- Dumping database ... done
2024-01-12 10:12:28 UTC -- Dumping repositories ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping uploads ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping builds ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping artifacts ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping pages ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping lfs objects ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping terraform states ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping container registry images ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping packages ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Dumping ci secure files ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Creating backup archive: 1705054338_2024_01_12_16.7.0_gitlab_backup.tar ... 
2024-01-12 10:12:28 UTC -- Creating backup archive: 1705054338_2024_01_12_16.7.0_gitlab_backup.tar ... done
2024-01-12 10:12:28 UTC -- Uploading backup archive to remote storage  ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Deleting old backups ... [SKIPPED]
2024-01-12 10:12:28 UTC -- Deleting tar staging files ... 
2024-01-12 10:12:28 UTC -- Cleaning up /var/opt/gitlab/backups/backup_information.yml
2024-01-12 10:12:28 UTC -- Cleaning up /var/opt/gitlab/backups/db
2024-01-12 10:12:28 UTC -- Deleting tar staging files ... done
2024-01-12 10:12:28 UTC -- Deleting backups/tmp ... 
2024-01-12 10:12:28 UTC -- Deleting backups/tmp ... done
2024-01-12 10:12:28 UTC -- Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data 
and are not included in this backup. You will need these files to restore a backup.
Please back them up manually.
2024-01-12 10:12:28 UTC -- Backup 1705054338_2024_01_12_16.7.0 is done.
2024-01-12 10:12:28 UTC -- Deleting backup and restore PID file ... done
gitlab preinstall: Automatically backing up /etc/gitlab
Running configuration backup
Creating configuration backup archive: gitlab_config_1705054351_2024_01_12.tar

as you can see it skips a lot of stuff, so that explains why it’s a lot smaller than your normal backup.

2 Likes

That’s what I thought, but when I run the command “gitlab-ctl backup-etc” it generates a file smaller than that, which makes sense since they are the gitlab-secrets.json and gitlab.rb files, much smaller than 1Mb in weight. Therefore, it seems to me that the backup . tar file created during the upgrade process includes more than just configurations and something less than the full backup.

Thanks @iwalker for your time.

1 Like

With this log, I understand that my projects data are not backed up, correct?? The backup during upgrade process only includes functionality of Gitlab and config files, for that reason is bigger than only config files and smaller than a complete backup which include my repos.

Thanks @iwalker .

1 Like