Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
d411a9e4
Commit
d411a9e4
authored
Mar 18, 2015
by
Valery Sizov
Committed by
Valery Sizov
Mar 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backup repo with tar instead of git bundle
parent
6c1074e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
CHANGELOG
CHANGELOG
+1
-0
lib/backup/repository.rb
lib/backup/repository.rb
+3
-2
No files found.
CHANGELOG
View file @
d411a9e4
...
@@ -86,6 +86,7 @@ v 7.9.0 (unreleased)
...
@@ -86,6 +86,7 @@ v 7.9.0 (unreleased)
- Ability to unsubscribe/subscribe to issue or merge request
- Ability to unsubscribe/subscribe to issue or merge request
- Delete deploy key when last connection to a project is destroyed.
- Delete deploy key when last connection to a project is destroyed.
- Fix invalid Atom feeds when using emoji, horizontal rules, or images (Christian Walther)
- 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
v 7.8.4
- Fix issue_tracker_id substitution in custom issue trackers
- Fix issue_tracker_id substitution in custom issue trackers
...
...
lib/backup/repository.rb
View file @
d411a9e4
...
@@ -16,7 +16,7 @@ module Backup
...
@@ -16,7 +16,7 @@ module Backup
if
project
.
empty_repo?
if
project
.
empty_repo?
$progress
.
puts
"[SKIPPED]"
.
cyan
$progress
.
puts
"[SKIPPED]"
.
cyan
else
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
)
output
,
status
=
Gitlab
::
Popen
.
popen
(
cmd
)
if
status
.
zero?
if
status
.
zero?
$progress
.
puts
"[DONE]"
.
green
$progress
.
puts
"[DONE]"
.
green
...
@@ -64,7 +64,8 @@ module Backup
...
@@ -64,7 +64,8 @@ module Backup
project
.
namespace
.
ensure_dir_exist
if
project
.
namespace
project
.
namespace
.
ensure_dir_exist
if
project
.
namespace
if
File
.
exists?
(
path_to_bundle
(
project
))
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
else
cmd
=
%W(git init --bare
#{
path_to_repo
(
project
)
}
)
cmd
=
%W(git init --bare
#{
path_to_repo
(
project
)
}
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment