Backup with CRON=1 generates unnecessary output in gitlab version >=12.0
Summary
Backup with CRON=1
generates unnecessary status/progress output in gitlab version >=12.0
Steps to reproduce
After upgrading to GitLab Omnibus 12.0 or later. Run a backup with CRON=1
and unnecessary status messages are output to stdout.
sudo /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1
Example Project
N/A
What is the current bug behavior?
$ sudo /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1
Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data
and are not included in this backup. You will need these files to restore a backup.
Please back them up manually.
Backup task is done.
$
What is the expected correct behavior?
$ sudo /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1
$
Relevant logs and/or screenshots
N/A
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.21.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 12.0.1 Revision: 0b1ae0ae6a7 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.7 URL: https://git.cfmm.robarts.ca HTTP Clone URL: https://git.cfmm.robarts.ca/some-group/some-project.git SSH Clone URL: git@git.cfmm.robarts.ca:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 9.3.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.3.0 ? ... OK (9.3.0) 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 Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results)
Checking LDAP ... Finished
Checking GitLab App ...
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? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. 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: ... 4/3 ... yes 4/5 ... yes 4/6 ... yes 4/7 ... yes 4/8 ... yes 4/9 ... yes 4/10 ... yes 4/11 ... yes 4/12 ... yes 4/14 ... yes 4/15 ... yes 4/16 ... yes 4/17 ... yes 4/18 ... yes 4/19 ... yes 4/20 ... yes 4/21 ... yes 4/22 ... yes 4/23 ... yes 4/24 ... yes 4/25 ... yes 4/26 ... yes 4/27 ... yes 4/28 ... yes 4/29 ... yes 4/30 ... yes 4/31 ... yes 4/32 ... yes 4/33 ... yes 4/34 ... yes 4/35 ... yes 5/36 ... yes 5/37 ... yes 5/38 ... yes 5/39 ... yes 5/40 ... yes 5/41 ... yes 5/42 ... yes 5/43 ... yes 5/44 ... yes 5/45 ... yes 5/46 ... yes 5/47 ... yes 5/48 ... yes 5/49 ... yes 5/50 ... yes 5/51 ... yes 5/52 ... yes 5/53 ... yes 5/54 ... yes 5/55 ... yes 5/56 ... yes 6/57 ... yes 7/58 ... yes 8/59 ... yes 8/61 ... yes 8/62 ... yes 2/63 ... yes 6/64 ... yes 2/65 ... yes 2/66 ... yes 37/67 ... yes 37/68 ... yes 16/70 ... yes 41/71 ... yes 16/73 ... yes 16/76 ... yes 8/77 ... yes 16/78 ... yes 16/79 ... yes 7/80 ... yes 7/82 ... yes 6/83 ... yes 2/84 ... yes 52/85 ... yes 5/88 ... yes 8/90 ... yes 6/91 ... yes 37/93 ... yes 37/94 ... yes 37/96 ... yes 37/97 ... yes 37/98 ... yes 2/99 ... yes 2/100 ... yes 52/103 ... yes 3/105 ... yes 16/106 ... yes 16/107 ... yes 16/108 ... yes 16/109 ... yes 16/110 ... yes 16/111 ... yes 16/112 ... yes 6/113 ... yes 6/114 ... yes 6/119 ... yes 7/121 ... yes 58/122 ... yes 58/123 ... yes 2/125 ... yes 16/126 ... yes 16/127 ... yes 8/129 ... yes 66/131 ... yes 6/132 ... yes 6/133 ... yes 63/135 ... yes 63/136 ... yes 8/138 ... yes 16/139 ... yes 6/140 ... yes 58/142 ... yes 33/144 ... yes 33/145 ... yes 68/146 ... yes 68/147 ... yes 63/148 ... yes 16/149 ... yes 68/150 ... yes 58/151 ... yes 58/152 ... yes 66/153 ... yes 8/154 ... yes 5/155 ... yes 6/156 ... yes 6/158 ... yes 6/159 ... yes 75/160 ... yes 75/161 ... yes 75/162 ... yes 75/165 ... yes 75/166 ... yes 75/167 ... yes 75/168 ... yes 75/169 ... yes 75/170 ... yes 75/172 ... yes 75/173 ... yes 75/174 ... yes 76/175 ... yes 58/176 ... yes 76/177 ... yes 79/178 ... yes 2/179 ... yes 75/180 ... yes 75/181 ... yes 2/182 ... yes 75/183 ... yes 6/184 ... yes 16/185 ... yes 2/186 ... yes 2/187 ... yes 85/188 ... yes 85/189 ... yes 85/190 ... yes 6/191 ... yes 75/200 ... yes 75/201 ... yes 89/202 ... yes 75/203 ... yes 63/204 ... yes 6/205 ... yes 6/206 ... yes 6/207 ... yes 6/208 ... yes 16/209 ... yes 75/210 ... yes 75/211 ... yes 75/212 ... yes 75/213 ... yes 75/215 ... yes 75/216 ... yes 75/217 ... yes 5/218 ... yes 8/219 ... yes 3/220 ... yes 73/221 ... yes 5/223 ... yes 94/224 ... yes 2/225 ... yes 16/226 ... yes 16/227 ... yes 90/229 ... yes 90/230 ... yes 75/231 ... yes 75/232 ... yes 90/233 ... yes 75/234 ... yes 66/235 ... yes 16/236 ... yes 85/237 ... yes 16/238 ... yes 16/239 ... yes 16/240 ... yes 16/241 ... yes 68/243 ... yes 68/244 ... yes 16/245 ... yes 97/247 ... yes 16/248 ... yes 2/249 ... yes 97/250 ... yes 2/251 ... yes 56/252 ... yes 85/254 ... yes 75/255 ... yes 75/256 ... yes 75/257 ... yes 75/258 ... yes 75/259 ... yes 75/260 ... yes 63/261 ... yes 75/262 ... yes 16/263 ... yes 75/264 ... yes 16/265 ... yes 75/266 ... yes 75/267 ... yes 16/268 ... yes 104/269 ... yes 105/270 ... yes 105/271 ... yes 105/272 ... yes 105/273 ... yes 105/274 ... yes 6/275 ... yes 105/276 ... yes 105/277 ... yes 75/278 ... yes 105/279 ... yes 3/280 ... yes 75/281 ... yes 107/282 ... yes 97/283 ... yes 2/285 ... yes 16/286 ... yes 75/287 ... yes 107/288 ... yes 105/289 ... yes 105/291 ... yes 105/293 ... yes 105/294 ... yes 105/295 ... yes 105/296 ... yes 16/297 ... yes 16/298 ... yes 107/299 ... yes 2/300 ... yes 97/301 ... yes 112/302 ... yes 103/303 ... yes 6/305 ... yes 75/306 ... yes 107/307 ... yes 75/309 ... yes 94/310 ... yes 94/311 ... yes 75/312 ... yes 75/313 ... yes 75/314 ... yes 107/315 ... yes 75/316 ... yes 94/317 ... yes 75/318 ... yes 112/321 ... yes 117/322 ... yes 117/324 ... yes 97/325 ... yes 107/327 ... yes 94/328 ... yes 94/329 ... yes 2/330 ... yes 75/331 ... yes 6/332 ... yes 2/333 ... yes 63/334 ... yes 90/335 ... yes 3/336 ... yes 75/337 ... yes 75/338 ... yes 94/339 ... yes 16/341 ... yes 16/342 ... yes 90/343 ... yes 94/344 ... yes 6/345 ... yes 16/346 ... yes 117/348 ... yes 16/349 ... yes 2/350 ... yes 58/351 ... yes 3/352 ... yes 3/353 ... yes 90/354 ... yes 117/355 ... yes 2/356 ... yes 6/358 ... yes 117/360 ... yes 117/361 ... yes 3/362 ... yes 117/363 ... yes 6/364 ... yes 75/365 ... yes 2/366 ... yes 2/367 ... yes 2/368 ... yes 6/371 ... yes 6/373 ... yes 6/374 ... yes 6/375 ... yes 107/376 ... yes 63/377 ... yes 63/378 ... yes 58/379 ... yes 58/380 ... yes 66/381 ... yes 75/382 ... yes 63/383 ... yes 63/384 ... yes 117/385 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.21.0 ? ... yes (2.21.0) Git user has default SSH configuration? ... yes Active users: ... 57
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
Workaround is to direct stdout to /dev/null
.
sudo /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1 > /dev/null