Skip to content

Backup store in remote location and in default location

Hi,

Summary

Backup generated by gitlab are store twice. One in /var/opt/gitlab/backups and one in my SMB mount in /mnt/backupServer

Steps to reproduce

  1. Upgrade backup configuration (in /etc/gitlab/gitlab.rb) to
gitlab_rails['backup_path'] = '/mnt/backupServer'

to

gitlab_rails['backup_keep_time'] = 1209600
gitlab_rails['backup_upload_connection'] = {
        :provider => 'Local',
        :local_root => '/mnt/backupServer'
}
gitlab_rails['backup_upload_remote_directory'] = 'gitlab'
  1. reconfigure gitlab
  2. make a backup with /opt/gitlab/bin/gitlab-rake gitlab:backup:create

What is the current bug behavior?

With that configuration when I did a backup, backups files was created in the 2 folders. It's the exact same file (exactly same sha1sum)

What is the expected correct behavior?

Just one backup in /mnt/backupServer

Output of checks

Results of GitLab environment info

> gitlab-rake gitlab:env:info

System information
System:         Debian 9.2
Current User:   git
Using RVM:      no
Ruby Version:   2.3.5p376
Gem Version:    2.6.13
Bundler Version:1.13.7
Rake Version:   12.1.0
Redis Version:  3.2.5
Git Version:    2.13.6
Sidekiq Version:5.0.4
Go Version:     unknown

GitLab information
Version:        10.2.1
Revision:       eb2643f
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     postgresql
URL:            https://gitlab.trace-software.com
HTTP Clone URL: https://gitlab.trace-software.com/some-group/some-project.git
SSH Clone URL:  git@gitlab.trace-software.com:some-group/some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        5.9.4
Repository storage paths:
- default:      /home/gitRepository/repositories
Hooks:          /opt/gitlab/embedded/service/gitlab-shell/hooks
Git:            /opt/gitlab/embedded/bin/git

Results of GitLab application Check

> gitlab-rake gitlab:check SANITIZE=true

Checking GitLab Shell ...

GitLab Shell version >= 5.9.4 ? ... OK (5.9.4)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
2/1 ... ok
2/3 ... ok
2/4 ... ok
2/5 ... ok
2/6 ... ok
2/10 ... ok
40/11 ... ok
2/13 ... ok
14/14 ... ok
2/15 ... ok
14/16 ... ok
2/17 ... repository is empty
41/18 ... ok
41/19 ... ok
41/20 ... ok
41/21 ... ok
40/22 ... ok
40/23 ... ok
40/24 ... ok
40/25 ... ok
40/27 ... ok
14/28 ... ok
20/29 ... ok
14/30 ... ok
40/32 ... ok
20/37 ... ok
23/41 ... ok
41/43 ... ok
14/44 ... ok
25/45 ... ok
23/47 ... ok
25/48 ... ok
25/49 ... ok
25/51 ... ok
25/52 ... ok
14/53 ... ok
25/54 ... ok
10/55 ... ok
29/56 ... ok
29/57 ... ok
29/58 ... ok
14/59 ... ok
15/60 ... ok
25/61 ... ok
14/64 ... ok
14/65 ... ok
41/66 ... ok
2/67 ... ok
41/68 ... ok
18/69 ... ok
33/70 ... ok
33/71 ... ok
14/72 ... ok
33/73 ... ok
14/74 ... ok
14/75 ... ok
33/77 ... ok
33/78 ... ok
33/79 ... ok
4/80 ... ok
14/81 ... ok
14/82 ... ok
18/83 ... ok
29/84 ... ok
36/85 ... ok
18/86 ... ok
14/87 ... ok
4/88 ... ok
14/89 ... ok
4/90 ... ok
25/92 ... ok
25/93 ... ok
14/94 ... ok
14/95 ... ok
14/96 ... ok
14/97 ... ok
2/98 ... ok
39/99 ... ok
25/101 ... ok
18/102 ... ok
39/103 ... ok
14/104 ... ok
44/106 ... ok
45/107 ... repository is empty
20/108 ... ok
22/109 ... ok
46/110 ... repository is empty
47/114 ... ok
25/115 ... ok
25/117 ... ok
15/118 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml
Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ...
2/1 ... yes
2/3 ... yes
2/4 ... yes
2/5 ... yes
2/6 ... yes
2/10 ... yes
40/11 ... yes
2/13 ... yes
14/14 ... yes
2/15 ... yes
14/16 ... yes
2/17 ... yes
41/18 ... yes
41/19 ... yes
41/20 ... yes
41/21 ... yes
40/22 ... yes
40/23 ... yes
40/24 ... yes
40/25 ... yes
40/27 ... yes
14/28 ... yes
20/29 ... yes
14/30 ... yes
40/32 ... yes
20/37 ... yes
23/41 ... yes
41/43 ... yes
14/44 ... yes
25/45 ... yes
23/47 ... yes
25/48 ... yes
25/49 ... yes
25/51 ... yes
25/52 ... yes
14/53 ... yes
25/54 ... yes
10/55 ... yes
29/56 ... yes
29/57 ... yes
29/58 ... yes
14/59 ... yes
15/60 ... yes
25/61 ... yes
14/64 ... yes
14/65 ... yes
41/66 ... yes
2/67 ... yes
41/68 ... yes
18/69 ... yes
33/70 ... yes
33/71 ... yes
14/72 ... yes
33/73 ... yes
14/74 ... yes
14/75 ... yes
33/77 ... yes
33/78 ... yes
33/79 ... yes
4/80 ... yes
14/81 ... yes
14/82 ... yes
18/83 ... yes
29/84 ... yes
36/85 ... yes
18/86 ... yes
14/87 ... yes
4/88 ... yes
14/89 ... yes
4/90 ... yes
25/92 ... yes
25/93 ... yes
14/94 ... yes
14/95 ... yes
14/96 ... yes
14/97 ... yes
2/98 ... yes
39/99 ... yes
25/101 ... yes
18/102 ... yes
39/103 ... yes
14/104 ... yes
44/106 ... yes
45/107 ... yes
20/108 ... yes
22/109 ... yes
46/110 ... yes
47/114 ... yes
25/115 ... yes
25/117 ... yes
15/118 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.5 ? ... yes (2.3.5)
Git version >= 2.7.3 ? ... yes (2.13.6)
Git user has default SSH configuration? ... yes
Active users: ... 27

Checking GitLab ... Finished
Edited by David Ducatel