create reproducable tar files
This commit is contained in:
parent
a0ca18863b
commit
d6f1f6ca6e
|
@ -135,6 +135,7 @@ def cmd_backup(args, parser, config, client):
|
|||
|
||||
args_tar += ['nice', '-n', '19']
|
||||
args_tar += [get_tarcmd(),
|
||||
'--sort=name',
|
||||
f'--exclude={LOCKFILE}',
|
||||
'--warning=no-file-changed',
|
||||
'--warning=no-file-removed',
|
||||
|
@ -143,9 +144,9 @@ def cmd_backup(args, parser, config, client):
|
|||
|
||||
# Use pigz if available (Parallel gzip - http://zlib.net/pigz/)
|
||||
if has_binary("pigz"):
|
||||
args_tar += ["--use-compress-program", "pigz"]
|
||||
args_tar += ["--use-compress-program", "pigz -n"]
|
||||
else:
|
||||
args_tar += ["-z"]
|
||||
args_tar += ["--use-compress-program", "gzip -n"] # pass -n to gzip to produce reproducible archives
|
||||
|
||||
# Excluded paths
|
||||
if backup_config["exclude"]:
|
||||
|
|
Loading…
Reference in New Issue