mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 12:04:40 +00:00
nixos/postgresqlBackup: add --rsyncable to compression programs
The --rsyncable option changes the behavior of gzip/zstd so that the resulting files can be incrementally backed up easily. Tools like Borg, rsync and xdelta can make use their deduplication/diff mechanisms more easily. In my local testing, this resulted in a 2% size increase for backup files. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
786100e12d
commit
0aaf428fde
@ -17,8 +17,8 @@ let
|
||||
|
||||
compressCmd = getAttr cfg.compression {
|
||||
"none" = "cat";
|
||||
"gzip" = "${pkgs.gzip}/bin/gzip -c -${toString cfg.compressionLevel}";
|
||||
"zstd" = "${pkgs.zstd}/bin/zstd -c -${toString cfg.compressionLevel}";
|
||||
"gzip" = "${pkgs.gzip}/bin/gzip -c -${toString cfg.compressionLevel} --rsyncable";
|
||||
"zstd" = "${pkgs.zstd}/bin/zstd -c -${toString cfg.compressionLevel} --rsyncable";
|
||||
};
|
||||
|
||||
mkSqlPath = prefix: suffix: "${cfg.location}/${db}${prefix}.sql${suffix}";
|
||||
|
Loading…
Reference in New Issue
Block a user