Commit 96b75b765744ef115876d2c0fe0aa625308b8a30
Exists in
master
and in
2 other branches
Merge branch 'doc/move_git_data' into 'master'
Document how to move repository data See merge request !189
Showing
1 changed file
with
24 additions
and
0 deletions
Show diff stats
README.md
@@ -214,6 +214,30 @@ git_data_dir "/mnt/nas/git-data" | @@ -214,6 +214,30 @@ git_data_dir "/mnt/nas/git-data" | ||
214 | 214 | ||
215 | Run `sudo gitlab-ctl reconfigure` for the change to take effect. | 215 | Run `sudo gitlab-ctl reconfigure` for the change to take effect. |
216 | 216 | ||
217 | +If you already have existing Git repositories in `/var/opt/gitlab/git-data` you | ||
218 | +can move them to the new location as follows: | ||
219 | + | ||
220 | +```shell | ||
221 | +# Prevent users from writing to the repositories while you move them. | ||
222 | +sudo gitlab-ctl stop | ||
223 | + | ||
224 | +# Only move 'repositories'; 'gitlab-satellites' will be recreated | ||
225 | +# automatically. Note there is _no_ slash behind 'repositories', but there _is_ a | ||
226 | +# slash behind 'git-data'. | ||
227 | +sudo rsync -av /var/opt/gitlab/git-data/repositories /mnt/nas/git-data/ | ||
228 | + | ||
229 | +# Fix permissions if necessary | ||
230 | +sudo gitlab-ctl reconfigure | ||
231 | + | ||
232 | +# Double-check directory layout in /mnt/nas/git-data. Expected output: | ||
233 | +# gitlab-satellites repositories | ||
234 | +sudo ls /mnt/nas/git-data/ | ||
235 | + | ||
236 | +# Done! Start GitLab and verify that you can browse through the repositories in | ||
237 | +# the web interface. | ||
238 | +sudo gitlab-ctl start | ||
239 | +``` | ||
240 | + | ||
217 | ### Changing the name of the Git user / group | 241 | ### Changing the name of the Git user / group |
218 | 242 | ||
219 | By default, omnibus-gitlab uses the user name `git` for Git gitlab-shell login, | 243 | By default, omnibus-gitlab uses the user name `git` for Git gitlab-shell login, |