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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1735e1e6
Commit
1735e1e6
authored
Feb 17, 2020
by
Henrik Christian Grove
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring of the unpack function
parent
a03e1f64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
lib/backup/manager.rb
lib/backup/manager.rb
+3
-4
No files found.
lib/backup/manager.rb
View file @
1735e1e6
...
...
@@ -125,9 +125,8 @@ module Backup
end
end
# rubocop: disable Cop/AvoidReturnFromBlocks
def
unpack
cleanup_required
=
true
Dir
.
chdir
(
backup_path
)
do
if
ENV
[
'BACKUP'
].
present?
# User has indicated which backup to restore
...
...
@@ -153,9 +152,8 @@ module Backup
progress
.
puts
'Please specify which one you want to restore:'
progress
.
puts
'rake gitlab:backup:restore BACKUP=timestamp_of_backup'
exit
1
else
tar_file
=
backup_file_list
.
first
end
tar_file
=
backup_file_list
.
first
progress
.
print
'Unpacking backup ... '
...
...
@@ -168,6 +166,7 @@ module Backup
end
true
end
# rubocop: enable Cop/AvoidReturnFromBlocks
def
tar_version
tar_version
,
_
=
Gitlab
::
Popen
.
popen
(
%w(tar --version)
)
...
...
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