Commit 6c206805ae445b7052d98640cb0083256d836db1

Authored by Dmitriy Zaporozhets
1 parent 3df5fee4

Backup/restore wiki repos too

Showing 1 changed file with 22 additions and 0 deletions   Show diff stats
lib/backup/repository.rb
... ... @@ -23,6 +23,17 @@ module Backup
23 23 else
24 24 puts "[FAILED]".red
25 25 end
  26 +
  27 + wiki = GollumWiki.new(project)
  28 +
  29 + if File.exists?(path_to_repo(wiki))
  30 + print " * #{wiki.path_with_namespace} ... "
  31 + if system("cd #{path_to_repo(wiki)} > /dev/null 2>&1 && git bundle create #{path_to_bundle(wiki)} --all > /dev/null 2>&1")
  32 + puts " [DONE]".green
  33 + else
  34 + puts " [FAILED]".red
  35 + end
  36 + end
26 37 end
27 38 end
28 39  
... ... @@ -45,6 +56,17 @@ module Backup
45 56 else
46 57 puts "[FAILED]".red
47 58 end
  59 +
  60 + wiki = GollumWiki.new(project)
  61 +
  62 + if File.exists?(path_to_bundle(wiki))
  63 + print " * #{wiki.path_with_namespace} ... "
  64 + if system("git clone --bare #{path_to_bundle(wiki)} #{path_to_repo(wiki)} > /dev/null 2>&1")
  65 + puts " [DONE]".green
  66 + else
  67 + puts " [FAILED]".red
  68 + end
  69 + end
48 70 end
49 71 end
50 72  
... ...