summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-03-19 15:54:53 +0000
committerMarin Jankovski <maxlazio@gmail.com>2015-03-19 10:19:14 -0700
commit1ea6b05e87bacfca0d1cbaf0c9db1833258d64c3 (patch)
treef0b03347d36b8ac149037dac7df14929b309d947
parent1667861ed2987bc3156af33700c48609b61546c8 (diff)
downloadgitlab-ce-1ea6b05e87bacfca0d1cbaf0c9db1833258d64c3.tar.gz
Merge branch 'rake_backup' into 'master'
Backup repo with tar instead of git bundle Fixes gitlab/gitlab-ee#246 See merge request !1723
-rw-r--r--CHANGELOG1
-rw-r--r--lib/backup/repository.rb5
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 27b930d23a6..16f625e2480 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -77,6 +77,7 @@ v 7.9.0 (unreleased)
- Ability to unsubscribe/subscribe to issue or merge request
- Delete deploy key when last connection to a project is destroyed.
- Fix invalid Atom feeds when using emoji, horizontal rules, or images (Christian Walther)
+ - Backup of repositories with tar instead of git bundle (only now are git-annex files included in the backup)
v 7.8.4
- Fix issue_tracker_id substitution in custom issue trackers
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