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
a331a06a
Commit
a331a06a
authored
Dec 20, 2017
by
julien MILLAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore "lost+found" folder during backup on a volume
parent
dc169280
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/backup/files.rb
lib/backup/files.rb
+3
-3
No files found.
lib/backup/files.rb
View file @
a331a06a
...
...
@@ -18,7 +18,7 @@ module Backup
FileUtils
.
rm_f
(
backup_tarball
)
if
ENV
[
'STRATEGY'
]
==
'copy'
cmd
=
%W(
cp -a
#{
app_files_dir
}
#{
Gitlab
.
config
.
backup
.
path
}
)
cmd
=
%W(
rsync -a --exclude=lost+found
#{
app_files_dir
}
#{
Gitlab
.
config
.
backup
.
path
}
)
output
,
status
=
Gitlab
::
Popen
.
popen
(
cmd
)
unless
status
.
zero?
...
...
@@ -26,10 +26,10 @@ module Backup
abort
'Backup failed'
end
run_pipeline!
([
%W(tar -C
#{
@backup_files_dir
}
-cf - .)
,
%w(gzip -c -1)
],
out:
[
backup_tarball
,
'w'
,
0600
])
run_pipeline!
([
%W(tar -
-exclude=lost+found -
C
#{
@backup_files_dir
}
-cf - .)
,
%w(gzip -c -1)
],
out:
[
backup_tarball
,
'w'
,
0600
])
FileUtils
.
rm_rf
(
@backup_files_dir
)
else
run_pipeline!
([
%W(tar -C
#{
app_files_dir
}
-cf - .)
,
%w(gzip -c -1)
],
out:
[
backup_tarball
,
'w'
,
0600
])
run_pipeline!
([
%W(tar -
-exclude=lost+found -
C
#{
app_files_dir
}
-cf - .)
,
%w(gzip -c -1)
],
out:
[
backup_tarball
,
'w'
,
0600
])
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