2022年10月2日 星期日

Memo of GitLab Backup and Restore

1. Backup

Similar to the reference, first one (origin English) and second one (Chinese working note),

https://pikedom.com/migrate-gitlab-instance-to-new-host/#Backup_GitLab

https://davidlin12tw.wordpress.com/2018/08/07/%E5%B7%A5%E4%BD%9C%E6%97%A5%E8%AA%8C8-6%E4%BA%8C-1gitlab%E5%82%99%E4%BB%BD%E9%82%84%E5%8E%9F/

 

a. Config Backup

Which backup all config setting at "/etc/gitlab" and pack them to one .tar file.


b. Application data backup

Very simple and quick to follow from official GitLab menual as

https://docs.gitlab.com/ee/raketasks/backup_restore.html

Lots of settings you can try and set.


c. Host backup (opt)

This is optional for the hostkey or related stuffs. Usually not in daily / frequently backup.


2. Restore

Stop the GitLab related process is the first step.

Extract and restore application data and config files.

First the application data and then the config files if necessary.

Remember to run the "gitlab:check" to check all stored database / repositories.

 

Ref:

1. https://pikedom.com/migrate-gitlab-instance-to-new-host/#Backup_GitLab

2. https://davidlin12tw.wordpress.com/2018/08/07/%E5%B7%A5%E4%BD%9C%E6%97%A5%E8%AA%8C8-6%E4%BA%8C-1gitlab%E5%82%99%E4%BB%BD%E9%82%84%E5%8E%9F/

3. https://docs.gitlab.com/ee/raketasks/backup_restore.html


Other info:

http://mycodetub.logdown.com/posts/260395-gitlab-backup-restore-settings-notes