summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-07-24 04:56:27 -0700
committerStan Hu <stanhu@gmail.com>2016-07-25 06:23:07 -0700
commitc6ff77d4b892c41c9fdbd8a8fbaec9ed611e10a4 (patch)
tree3b54567b01ae897976caf11a1766cb040b16cd6d
parent8987257498c785e1ecf90c6cb85b9d1db06d9797 (diff)
downloadgitlab-ce-c6ff77d4b892c41c9fdbd8a8fbaec9ed611e10a4.tar.gz
Fix backup restorefix-backup-restore
Set permissions of backup dir to g+s Closes #20188
-rw-r--r--CHANGELOG1
-rw-r--r--lib/backup/repository.rb4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 2f9b6e0da24..d8dd4451224 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -11,6 +11,7 @@ v 8.11.0 (unreleased)
v 8.10.2 (unreleased)
- Use project ID in repository cache to prevent stale data from persisting across projects
+ - Fix backup restore
v 8.10.1 (unreleased)
- Fix Error 500 when creating Wiki pages with hyphens or spaces
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index b9773f98d75..1f5917b8127 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -54,10 +54,10 @@ module Backup
# Move repos dir to 'repositories.old' dir
bk_repos_path = File.join(path, '..', 'repositories.old.' + Time.now.to_i.to_s)
FileUtils.mv(path, bk_repos_path)
+ # This is expected from gitlab:check
+ FileUtils.mkdir_p(path, mode: 2770)
end
- FileUtils.mkdir_p(repos_path)
-
Project.find_each(batch_size: 1000) do |project|
$progress.print " * #{project.path_with_namespace} ... "