默认情况下,GitLab会将数据库文件放在 /var/opt/gitlab/postgresql/data 中。
如果要修改数据库文件位置,需要将 /var/opt/gitlab/postgresql/data 中的所有文件复制到新的位置,然后在 /etc/gitlab/gitlab.rb 中设置以下4个配置至新的位置:
postgresql['dir'] = postgresql['data_dir'] = postgresql['log_directory'] = postgresql['home'] =
进行这样的设置后,运行gitlab-ctl reconfigure,却出现下面的错误提示:
================================================================================ Error executing action `create` on resource 'user[gitlab-psql]' ================================================================================ Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0], but received '8' ---- Begin output of ["usermod", "-d", "/gitlab/postgresql/data", "gitlab-psql"] ---- STDOUT: STDERR: usermod: user gitlab-psql is currently logged in ---- End output of ["usermod", "-d", "/gitlab/postgresql/data", "gitlab-psql"] ---- Ran ["usermod", "-d", "/gitlab/postgresql/data", "gitlab-psql"] returned 8
慕的地10843
相关分类