From a4af36c402cbeb3cac2424a049fccc56edf77a9a Mon Sep 17 00:00:00 2001 From: Kayou Date: Tue, 27 Aug 2019 00:10:39 +0200 Subject: [PATCH] Fix restore --- scripts/restore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index be424b5..ddd8ec1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -144,7 +144,9 @@ gitlab-ctl stop sidekiq ynh_exec_warn_less gitlab-backup restore force=yes BACKUP=$last_backup # https://docs.gitlab.com/ce/raketasks/backup_restore.html#container-registry-push-failures-after-restoring-from-a-backup -chown -R registry:registry /var/opt/gitlab/gitlab-rails/shared/registry/docker +if ynh_user_exists --username="registry" && [ -d "/var/opt/gitlab/gitlab-rails/shared/registry/docker" ]; then + chown -R registry:registry /var/opt/gitlab/gitlab-rails/shared/registry/docker +fi #================================================= # GENERIC FINALIZATION