summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2018-05-11 15:09:26 -0700
committerAhmad Hassan <ahmad.hassan612@gmail.com>2018-05-15 16:43:04 +0300
commitb8b82aa50e677d6e38b32080a65b48211350e9af (patch)
tree22f69bd9fe94d888ba0b73a18eadd55ab1bcc480
parentd5bd61e82f425288397b53ba077eb59782fb12ca (diff)
downloadgitlab-ce-b8b82aa50e677d6e38b32080a65b48211350e9af.tar.gz
Fix the paths for wiki restore
-rw-r--r--lib/backup/repository.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index 0e12f70a066..38751a1040e 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -96,7 +96,7 @@ module Backup
prepare_directories
gitlab_shell = Gitlab::Shell.new
Project.find_each(batch_size: 1000) do |project|
- progress.print " * #{project.name} ... "
+ progress.print " * #{project.full_path} ... "
path_to_project_bundle = path_to_bundle(project)
path_to_project_repo = path_to_repo(project)
project.ensure_storage_path_exists
@@ -116,9 +116,9 @@ module Backup
end
if restore_repo_status
- progress.puts "[DONE] restoring #{project.name} repository".color(:green)
+ progress.puts "[DONE]".color(:green)
else
- progress.puts "[Failed] restoring #{project.name} repository".color(:red)
+ progress.puts "[Failed] restoring #{project.full_path} repository".color(:red)
end
gitaly_migrate(:restore_custom_hooks) do |is_enabled|
@@ -139,12 +139,13 @@ module Backup
path_to_wiki_bundle = path_to_bundle(wiki)
if File.exist?(path_to_wiki_bundle)
+ progress.print " * #{wiki.full_path} ... "
begin
- gitlab_shell.remove_repository(project.wiki.repository_storage, project.wiki.disk_path) if project.wiki_repository_exists?
- project.repository.create_from_bundle(path_to_wiki_bundle)
- progress.puts "[DONE] restoring #{project.name} wiki".color(:green)
+ gitlab_shell.remove_repository(wiki.repository_storage, wiki.disk_path) if wiki.repository_exists?
+ wiki.repository.create_from_bundle(path_to_wiki_bundle)
+ progress.puts "[DONE]".color(:green)
rescue StandardError => e
- progress.puts "[Failed] restoring #{project.name} wiki".color(:red)
+ progress.puts "[Failed] restoring #{wiki.full_path} wiki".color(:red)
progress.puts "Error #{e}".color(:red)
end
end