Skip to content

Backup utility does not accept all skip components on restore

Summary

When restoring components using CNG backup utility, only the first --skip argument is accepted and the followings are ignored (not skipped).

Steps to reproduce

Run the following command in a GitLab Toolbox Pod:

backup-utility --restore --skip registry --skip pages

What is the current bug behavior?

Restoring registry is skipped, but restoring pages is not skipped.

$ backup-utility --restore --skip registry --skip pages
(Omitted)
Restoring pages ...
sync existing of pages failed

What is the expected correct behavior?

Restoring both registry and pages is skipped.

Possible fixes

https://gitlab.com/gitlab-org/build/CNG/-/blob/1234f4d74eef9788bcfb6102db137549e97a3cb3/gitlab-toolbox/scripts/bin/backup-utility#L302