Commit c8ac2f3a authored by Kirill Smelkov's avatar Kirill Smelkov

gitlab-backup/restore: GitLab wants repositories to be drwxrws---

As git-backup does not currently preserve file persmissions fully, we
need to adjust them on restore. For repositories after restore the
following gitlab check currently fails:

    Repo base access is drwxrws---? ... no

Fix it.

/cc @kazuhiko
parent d31febed
...@@ -239,7 +239,11 @@ backup_restore() { ...@@ -239,7 +239,11 @@ backup_restore() {
rm -rf "$tmpd" # tmpd no longer needed rm -rf "$tmpd" # tmpd no longer needed
# 4. extract repositories into .../repositories.<timestamp> # 4. extract repositories into .../repositories.<timestamp>
$GIT_BACKUP restore $HEAD gitlab/repo:"${GITLAB_REPOS_PATH}.${backup_created_at}" reposX="${GITLAB_REPOS_PATH}.${backup_created_at}"
$GIT_BACKUP restore $HEAD gitlab/repo:"$reposX"
# gitlab wants repositories to be drwxrws---
chmod u=rwx,g=rwxs,o=--- "$reposX"
# extraction complete - now proceed with actual backup restore # extraction complete - now proceed with actual backup restore
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment