Building a personal Gitlab repository can better maintain code or text schema with frequent iteration. To ensure the security of important data, it is important to back up Gitlab data regularly.

Reference tutorial: Build Gitlab code repository on Linux

Step 1 Back up data (database, users, user groups, user keys, permissions, etc.)

[root@wanghualang ~]# gitlab:backup:create (1581573475_2020_02_13_12.7.5)

[root@wanghualang ~]# ls /var/opt/gitlab/backups/ 1581573475_2020_02_13_12.7.5_gitlab_backup.tar Step 3 Stop data connections

[root@wanghualang ~]# gitlab-ctl stop unicorn [root@wanghualang ~]# You can also migrate to another server for recovery

[root@wanghualang ~]# gitlab-rake :backup:restore backup =1581573475_2020_02_13_12.7.5