summaryrefslogtreecommitdiff
path: root/doc/development/db_dump.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-06 03:08:08 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-06 03:08:08 +0000
commita6011c3d70e0e8ac318ba6629183c44f8614c4df (patch)
treea3d21394d63c47448998c89f01eb88e57c0ed8ce /doc/development/db_dump.md
parentffc757a7a92535559c20eb706593f7358d9bf589 (diff)
downloadgitlab-ce-a6011c3d70e0e8ac318ba6629183c44f8614c4df.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/db_dump.md')
-rw-r--r--doc/development/db_dump.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/development/db_dump.md b/doc/development/db_dump.md
index 97762a62a80..bb740d12f7b 100644
--- a/doc/development/db_dump.md
+++ b/doc/development/db_dump.md
@@ -10,7 +10,7 @@ data leaks.
On the staging VM, add the following line to `/etc/gitlab/gitlab.rb` to speed up
large database imports.
-```
+```shell
# On STAGING
echo "postgresql['checkpoint_segments'] = 64" | sudo tee -a /etc/gitlab/gitlab.rb
sudo touch /etc/gitlab/skip-auto-reconfigure
@@ -23,7 +23,7 @@ Next, we let the production environment stream a compressed SQL dump to our
local machine via SSH, and redirect this stream to a psql client on the staging
VM.
-```
+```shell
# On LOCAL MACHINE
ssh -C gitlab.example.com sudo -u gitlab-psql /opt/gitlab/embedded/bin/pg_dump -Cc gitlabhq_production |\
ssh -C staging-vm sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -d template1
@@ -37,14 +37,14 @@ use this procedure.
First, on the production server, create a list of directories you want to
re-create.
-```
+```shell
# On PRODUCTION
(umask 077; sudo find /var/opt/gitlab/git-data/repositories -maxdepth 1 -type d -print0 > directories.txt)
```
Copy `directories.txt` to the staging server and create the directories there.
-```
+```shell
# On STAGING
sudo -u git xargs -0 mkdir -p < directories.txt
```