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
e8419fb5
Commit
e8419fb5
authored
Dec 26, 2018
by
Frederic Van Espen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set the --rsyncable option for gzip
parent
7a58eb2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/backup/database.rb
lib/backup/database.rb
+1
-1
lib/backup/files.rb
lib/backup/files.rb
+2
-2
No files found.
lib/backup/database.rb
View file @
e8419fb5
...
...
@@ -17,7 +17,7 @@ module Backup
FileUtils
.
mkdir_p
(
File
.
dirname
(
db_file_name
))
FileUtils
.
rm_f
(
db_file_name
)
compress_rd
,
compress_wr
=
IO
.
pipe
compress_pid
=
spawn
(
*
%w(gzip -1 -c)
,
in:
compress_rd
,
out:
[
db_file_name
,
'w'
,
0600
])
compress_pid
=
spawn
(
*
%w(gzip -
-rsyncable -
1 -c)
,
in:
compress_rd
,
out:
[
db_file_name
,
'w'
,
0600
])
compress_rd
.
close
dump_pid
=
...
...
lib/backup/files.rb
View file @
e8419fb5
...
...
@@ -31,10 +31,10 @@ module Backup
raise
Backup
::
Error
,
'Backup failed'
end
run_pipeline!
([
%W(
#{
tar
}
--exclude=lost+found -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 -
-rsyncable -
c -1)
],
out:
[
backup_tarball
,
'w'
,
0600
])
FileUtils
.
rm_rf
(
@backup_files_dir
)
else
run_pipeline!
([
%W(
#{
tar
}
--exclude=lost+found -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 -
-rsyncable -
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