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
Kazuhiko Shiozaki
gitlab-ce
Commits
f5e3d93c
Commit
f5e3d93c
authored
Nov 18, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check which folders and archives should be packed before passing to tar command.
parent
3b1f68e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
lib/backup/manager.rb
lib/backup/manager.rb
+6
-8
No files found.
lib/backup/manager.rb
View file @
f5e3d93c
...
@@ -150,17 +150,15 @@ module Backup
...
@@ -150,17 +150,15 @@ module Backup
private
private
def
backup_contents
def
backup_contents
folders_to_backup
+
[
"uploads.tar.gz"
,
"builds.tar.gz"
,
"artifacts.tar.gz"
,
"backup_information.yml"
]
folders_to_backup
+
archives_to_backup
+
[
"backup_information.yml"
]
end
end
def
folders_to_backup
def
archives_to_backup
folders
=
%w{repositories db}
%w{uploads builds artifacts}
.
map
{
|
name
|
(
name
+
".tar.gz"
)
unless
skipped?
(
name
)
}.
compact
end
if
ENV
[
"SKIP"
]
return
folders
.
reject
{
|
folder
|
ENV
[
"SKIP"
].
include?
(
folder
)
}
end
folders
def
folders_to_backup
%w{repositories db}
.
map
{
|
name
|
name
unless
skipped?
(
name
)
}.
compact
end
end
def
settings
def
settings
...
...
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