How do you backup gitlab.rb file and then restore it?

This might be super silly question with an obvious answer.
But how do you take a backup of /etc/gitlab.rb file? And then restore it if you need to? My understanding is to just copy the file and put it in a different dir, use it if something goes wrong with the original config file.
Thank you :smiley:

Yes, you can copy it, as well as the gitlab-secrets.json file. Then, when you restore you put them back in /etc/gitlab and then do:

gitlab-ctl reconfigure

to get a running instance, and then it’s possible to restore the backup after this to get the database populated, etc.

2 Likes