GitLab 11.1.4 修改默认备份目录

8,257次阅读
没有评论

共计 1693 个字符,预计需要花费 5 分钟才能阅读完成。

[root@izuf6fy69k7l7e20jogcj7z ~]# ll /var/opt/gitlab/
total 80
drwxr-x---  3 gitlab-prometheus root       4096 Aug 27 22:35 alertmanager
drwx------  2 git               root       4096 Aug 19 22:34 backups
-rw-------  1 root              root         38 Aug 19 22:35 bootstrapped
drwxr-xr-x  2 root              root       4096 Aug 29 00:42 crond
drwx------  2 git               root       4096 Aug 27 22:59 gitaly
drwx------  3 git               root       4096 Aug 19 22:34 git-data
drwxr-xr-x  3 git               root       4096 Aug 19 22:34 gitlab-ci
drwxr-xr-x  2 git               root       4096 Aug 27 22:35 gitlab-monitor
drwxr-xr-x  9 git               root       4096 Aug 27 22:35 gitlab-rails
drwx------  2 git               root       4096 Aug 27 22:34 gitlab-shell
drwxr-x---  2 git               gitlab-www 4096 Aug 27 22:59 gitlab-workhorse
drwx------  3 root              root       4096 Aug 30 21:09 logrotate
drwxr-x--- 10 root              gitlab-www 4096 Aug 27 22:59 nginx
drwxr-xr-x  3 root              root       4096 Aug 19 22:35 node-exporter
drwx------  2 gitlab-psql       root       4096 Aug 27 22:35 postgres-exporter
drwxr-xr-x  3 gitlab-psql       root       4096 Aug 27 22:59 postgresql
drwxr-x---  4 gitlab-prometheus root       4096 Aug 27 22:35 prometheus
-rw-r--r--  1 root              root        191 Aug 29 00:42 public_attributes.json
drwxr-x---  2 gitlab-redis      git        4096 Aug 30 21:18 redis
-rw-r--r--  1 root              root         40 Aug 19 22:34 trusted-certs-directory-hash

1、首先创建自定义存放目录/backups:mkdir /git-data/backups

[root@izuf6fy69k7l7e20jogcj7z ~]# mkdir /git-data/backups
[root@izuf6fy69k7l7e20jogcj7z ~]# ll /git-data/
total 8
drwxr-xr-x 2 root root 4096 Aug 30 21:23 backups
drwxrws--- 4 git  root 4096 Aug 27 22:59 repositories

2、配置backups目录属主和属组为git:chown -R git.git /git-data/backups/

[root@izuf6fy69k7l7e20jogcj7z ~]# chown -R git.git /git-data/backups/
[root@izuf6fy69k7l7e20jogcj7z ~]# ll /git-data/
total 8
drwxr-xr-x 2 git git  4096 Aug 30 21:23 backups
drwxrws--- 4 git root 4096 Aug 27 22:59 repositories

3、编辑修改配置文件/etc/gitlab/gitlab.rb

gitlab_rails['backup_path'] = "/git-data/backups"    <<自定义备份目录路径
gitlab_rails['backup_archive_permissions'] = 0644    <<生成的备份文件权限
gitlab_rails['backup_keep_time'] = 604800    <<自定义备份保留时间(单位秒;默认 604800 秒=7 天)

4、执行命令gitlab-ctl reconfigure重载配置文件

正文完
 0
Yvan
版权声明:本站原创文章,由 Yvan 于2018-08-10发表,共计1693字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)

IT运维网

IT运维网
IT运维网
一个与IT运维相关的网站
用户数
18081
文章数
224
评论数
45
阅读量
1990012
一言一句话
-「
文章搜索
热门文章
EVE-NG全系列模板镜像(2025-12-08更新)

EVE-NG全系列模板镜像(2025-12-08更新)

链接:https://pan.baidu.com/s/1bbNFX_rUvpukapjEZ49ASw 提取码:...
热评文章
EVE-NG全系列模板镜像(2025-12-08更新)

EVE-NG全系列模板镜像(2025-12-08更新)

链接:https://pan.baidu.com/s/1bbNFX_rUvpukapjEZ49ASw 提取码:...
最新评论
Yvan Yvan 不清楚你那边的具体情况,所以我也说不上来,有问题可以在群内直接讨论!~
Yvan Yvan 目前针对12.5.2版本的话我这边没有。
fukua2025 fukua2025 ETX有没有patch好的下载地址
fits_996 fits_996 nxosv9k-7.0.3.I7.8.tgz有些镜像开不起来是什么情况。
killingangel killingangel 楼主这种开源精神 赞赞赞赞
wangshushu wangshushu 必须点赞
wangshushu wangshushu 楼主这种开源精神 大赞一个
Anthony Anthony 牛逼!特意登陆评论下
yvan yvan 已更新版本及更新链接!~!~