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
Léo-Paul Géneau
gitlab-ce
Commits
5a8cf78d
Commit
5a8cf78d
authored
Jan 15, 2018
by
Balasankar "Balu" C
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move conditional to a separate method
parent
295524bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lib/backup/manager.rb
lib/backup/manager.rb
+5
-3
No files found.
lib/backup/manager.rb
View file @
5a8cf78d
...
...
@@ -110,9 +110,7 @@ module Backup
elsif
backup_file_list
.
many?
&&
ENV
[
"BACKUP"
].
nil?
$progress
.
puts
'Found more than one backup:'
# print list of available backups
backup_file_list
.
each
do
|
item
|
$progress
.
puts
" "
+
item
.
gsub
(
"
#{
FILE_NAME_SUFFIX
}
"
,
""
)
end
$progress
.
puts
" "
+
available_timestamps
.
join
(
"
\n
"
)
$progress
.
puts
'Please specify which one you want to restore:'
$progress
.
puts
'rake gitlab:backup:restore BACKUP=timestamp_of_backup'
exit
1
...
...
@@ -174,6 +172,10 @@ module Backup
@backup_file_list
||=
Dir
.
glob
(
"*
#{
FILE_NAME_SUFFIX
}
"
)
end
def
available_timestamps
@backup_file_list
.
map
{
|
item
|
item
.
gsub
(
"
#{
FILE_NAME_SUFFIX
}
"
,
""
)}
end
def
connect_to_remote_directory
(
connection_settings
)
# our settings use string keys, but Fog expects symbols
connection
=
::
Fog
::
Storage
.
new
(
connection_settings
.
symbolize_keys
)
...
...
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