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>

authored by scrumplex.net and committed by Robert Helgesson 0aaf428f 786100e1

+2 -2
+2 -2
nixos/modules/services/backup/postgresql-backup.nix
··· 17 18 compressCmd = getAttr cfg.compression { 19 "none" = "cat"; 20 - "gzip" = "${pkgs.gzip}/bin/gzip -c -${toString cfg.compressionLevel}"; 21 - "zstd" = "${pkgs.zstd}/bin/zstd -c -${toString cfg.compressionLevel}"; 22 }; 23 24 mkSqlPath = prefix: suffix: "${cfg.location}/${db}${prefix}.sql${suffix}";
··· 17 18 compressCmd = getAttr cfg.compression { 19 "none" = "cat"; 20 + "gzip" = "${pkgs.gzip}/bin/gzip -c -${toString cfg.compressionLevel} --rsyncable"; 21 + "zstd" = "${pkgs.zstd}/bin/zstd -c -${toString cfg.compressionLevel} --rsyncable"; 22 }; 23 24 mkSqlPath = prefix: suffix: "${cfg.location}/${db}${prefix}.sql${suffix}";