1.備份目錄路徑設置
[root@code-server ~]# vim /etc/gitlab/gitlab.rb
gitlab_rails['manage_backup_path'] = true
gitlab_rails['backup_path'] = "/data/gitlab/backups" //gitlab備份目錄
gitlab_rails['backup_archive_permissions'] = 0644 //生成的備份文件權限
gitlab_rails['backup_keep_time'] = 7776000 //備份保留天數(shù)為3個月(即90天,這里是7776000秒)
[root@code-server ~]# mkdir -p /data/gitlab/backups
[root@code-server ~]# chown -R git.git /data/gitlab/backups
[root@code-server ~]# chmod -R 777 /data/gitlab/backups
如上設置了gitlab備份目錄路徑為/data/gitlab/backups,最后使用下面命令重載gitlab配置文件,是上述修改生效!
root@code-server ~]# gitlab-ctl reconfigure