summaryrefslogtreecommitdiff
path: root/lib/backup
diff options
context:
space:
mode:
authorValery Sizov <admin@example.com>2015-03-18 20:40:16 +0200
committerValery Sizov <vsv2711@gmail.com>2015-03-19 14:36:02 +0200
commitd411a9e4d8063fdc9b6d0f74cad7345245a1fb0b (patch)
tree7713f2735888b866f2a6165476ee37d0e0fa5ce3 /lib/backup
parent6c1074e302fd77e87c454cede145dd92f15d0c55 (diff)
downloadgitlab-ce-d411a9e4d8063fdc9b6d0f74cad7345245a1fb0b.tar.gz
backup repo with tar instead of git bundle
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/repository.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index e18bc804437..dfb2da9f84e 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -16,7 +16,7 @@ module Backup
if project.empty_repo?
$progress.puts "[SKIPPED]".cyan
else
- cmd = %W(git --git-dir=#{path_to_repo(project)} bundle create #{path_to_bundle(project)} --all)
+ cmd = %W(tar -cf #{path_to_bundle(project)} -C #{path_to_repo(project)} .)
output, status = Gitlab::Popen.popen(cmd)
if status.zero?
$progress.puts "[DONE]".green
@@ -64,7 +64,8 @@ module Backup
project.namespace.ensure_dir_exist if project.namespace
if File.exists?(path_to_bundle(project))
- cmd = %W(git clone --bare #{path_to_bundle(project)} #{path_to_repo(project)})
+ FileUtils.mkdir_p(path_to_repo(project))
+ cmd = %W(tar -xf #{path_to_bundle(project)} -C #{path_to_repo(project)})
else
cmd = %W(git init --bare #{path_to_repo(project)})
end