mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
gitlab: moved backups directory to /home/git/data/backups
This commit is contained in:
parent
5a32907c88
commit
231aae2ed2
@ -170,12 +170,10 @@ Before taking a backup, please make sure that the gitlab image is not running fo
|
||||
docker stop <container-id>
|
||||
```
|
||||
|
||||
For backups we mount a volume at /home/git/gitlab/tmp/backups so the backups are saved securely. With the volume mounted, all that you need to do is pass the "app:backup" command to the container image.
|
||||
To take a backup all you need to do is pass the "app:backup" command to the container image.
|
||||
|
||||
```bash
|
||||
mkdir -p /opt/gitlab/backups
|
||||
docker run -i -t -h git.local.host \
|
||||
-v /opt/gitlab/backups:/home/git/gitlab/tmp/backups \
|
||||
docker run -i -t -h git.local.host \
|
||||
-v /opt/gitlab/data:/home/git/data \
|
||||
-v /opt/gitlab/.ssh:/home/git/.ssh \
|
||||
sameersbn/gitlab app:backup
|
||||
|
||||
@ -166,15 +166,16 @@ sudo chmod ug-s /home/git/data/gitlab-satellites/
|
||||
find /home/git/data/gitlab-satellites/ -type d -print0 | sudo xargs -0 chmod g+s
|
||||
chown git:git /home/git/data/gitlab-satellites
|
||||
|
||||
# create the backups directory
|
||||
sudo -u git -H mkdir -p /home/git/data/backups/
|
||||
chown git:git /home/git/data/backups/
|
||||
|
||||
# make sure /home/git/.ssh/ has the right permissions in case it is mounted as a volume.
|
||||
touch /home/git/.ssh/authorized_keys
|
||||
chmod 700 /home/git/.ssh
|
||||
chmod 600 /home/git/.ssh/authorized_keys
|
||||
chown -R git:git /home/git/.ssh
|
||||
|
||||
# make sure /home/git/gitlab/tmp/backups has the right permissions in case it is mounted as a volume.
|
||||
chown git:git /home/git/gitlab/tmp/backups
|
||||
|
||||
cd /home/git/gitlab/
|
||||
|
||||
db_initialize () {
|
||||
|
||||
@ -44,8 +44,8 @@ chmod -R u+rwX log tmp
|
||||
sudo -u git -H mkdir -p public/uploads
|
||||
chmod -R u+rwX public/uploads
|
||||
|
||||
# create backups directory
|
||||
sudo -u git -H mkdir -p tmp/backups
|
||||
# create symlink to backups directory
|
||||
sudo -u git -H ln -s /home/git/data/backups tmp/backups
|
||||
|
||||
# create production log
|
||||
sudo -u git -H touch log/production.log
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user