I set up GitLab on a VPS and want to make backups on an hourly basis. I have made a script that basically runs “sudo gitlab-backup create” and some other commands like “sudo gitlab-ctl backup-etc” and then moves the backup to another server. Testing this I created a backup, changed some data (well actually I only changed a user name) and restored the backup using “sudo gitlab-backup restore BACKUP=some-file-name”. I expected the user to be changed back to what is was before I changed it, but no.
So now I’m wondering: what is included in a backup and what is not? And what is the best way to create a backup that contains all data?
So what is the point of backing up when it can not be completely restored? Users are connected to projects in GitLab aren’t they? What happens when this connection is disturbed?
Shocking little. I recently set up a second GitLab server in the company (for specialised use, with more tight firewall rules, that would not please all the users of the old one), and for migrating projects, I described (users have to do the work themselves) a process involving exporting projects from the old server and importing them on the new. When I started testing that, I had not created every user of the project I was importing (some of them have stopped working here and won’t get an account on the new server) but everything worked, e.g. commits were attributed to the right people. I’m guessing the reason things just worked is because everything (?) is coupled to an email address, add multiple email addresses to the same user, you might see things go wrong.
(We have scripts for maintaining our user database through the API, so I’m kind of glad the backup process leaves users out.)
As @grove pointed out, there was a change to the GitLab backup rake command in 12.2. The backup rake task is a wrapper for backup:create with an additional fix to improve container registry backups.
I’m currently running the latest version of GitLab CE (v12.5.3) and as I pointed out, on making a backup using the command “sudo gitlab-backup create”, changing a user’s name, restoring the backup using “sudo gitlab-backup restore BACKUP=”, the user’s name was not restored as I expected. No errors were shown.
What you are saying is that what I’m doing and should it work as described?