By default gitlab-rake gitlab:backup:create creates a backup .tar at /var/opt/gitlab/backups.

If you change that folder to a mounted cifs partition, you end up with broken .tar files (“Error File changed while writing .tar”)

Alternatively, you can configure fog (included with Gitlab by default for exactly this purpose) to instead copy the backup to a directory after it’s been assembled:

# /etc/gitlab/gitlab.rb
#####

# ...
# Upload the backup using the Fog library
gitlab_rails['backup_upload_connection'] = {
  'provider' => 'Local',
  'local_root' => '/mnt/gitlab_bak'
}
# ...

I’ve come across trying to solve this problem a few times on my own installations, and also in some questions in the wild – leaving this here for future me to remember what I’m talking about.