修改postgresql存储目录

修改postgresql存储目录:

sudo rsync -av /var/opt/gitlab/postgresql /data/gitlab/git

修改 /etc/gitlab/gitlab.rb

postgresql[‘data_dir’] = “/data/gitlab/postgresql/data”
postgresql[‘dir’] = “/data/gitlab/postgresql”
postgresql[‘home’] = “/data/gitlab/postgresql”web

从新加载配置,并重启gitlab

gitlab-ctl reconfigure
gitlab-ctl restartsql

注意:保留原位置目录 /var/opt/gitlab/postgresql (会建立 s.PGSQL.5432 文件)