Proper wiki restore. Fixes #845
This commit is contained in:
parent
27cd35de69
commit
880478b21e
2 changed files with 13 additions and 9 deletions
|
@ -2,7 +2,7 @@ v 7.6.0
|
||||||
- Fork repository to groups
|
- Fork repository to groups
|
||||||
- New rugged version
|
- New rugged version
|
||||||
- Add CRON=1 backup setting for quiet backups
|
- Add CRON=1 backup setting for quiet backups
|
||||||
-
|
- Fix failing wiki restore
|
||||||
-
|
-
|
||||||
- Add optional Sidekiq MemoryKiller middleware (enabled via SIDEKIQ_MAX_RSS env variable)
|
- Add optional Sidekiq MemoryKiller middleware (enabled via SIDEKIQ_MAX_RSS env variable)
|
||||||
-
|
-
|
||||||
|
|
|
@ -79,16 +79,20 @@ module Backup
|
||||||
|
|
||||||
wiki = ProjectWiki.new(project)
|
wiki = ProjectWiki.new(project)
|
||||||
|
|
||||||
|
$progress.print " * #{wiki.path_with_namespace} ... "
|
||||||
|
|
||||||
if File.exists?(path_to_bundle(wiki))
|
if File.exists?(path_to_bundle(wiki))
|
||||||
$progress.print " * #{wiki.path_with_namespace} ... "
|
|
||||||
cmd = %W(git clone --bare #{path_to_bundle(wiki)} #{path_to_repo(wiki)})
|
cmd = %W(git clone --bare #{path_to_bundle(wiki)} #{path_to_repo(wiki)})
|
||||||
if system(*cmd, silent)
|
else
|
||||||
$progress.puts " [DONE]".green
|
cmd = %W(git init --bare #{path_to_repo(wiki)})
|
||||||
else
|
end
|
||||||
puts " [FAILED]".red
|
|
||||||
puts "failed: #{cmd.join(' ')}"
|
if system(*cmd, silent)
|
||||||
abort 'Restore failed'
|
$progress.puts " [DONE]".green
|
||||||
end
|
else
|
||||||
|
puts " [FAILED]".red
|
||||||
|
puts "failed: #{cmd.join(' ')}"
|
||||||
|
abort 'Restore failed'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue