默認情況下,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
GitLab修改PostgreSQL數據庫文件位置的問題
jeck貓
2018-08-03 06:09:03