Backing up database - large snapshot size

I have a problem with backing up postgresql dumps, it’s simple
su - postgres -c pg_dumpall | restic --stdin
via sftp, stored on ext4 partition.

Single dump size reported by restic is 8800-8900MB, stored is about 4000MB. Gzipped dump is about 1700MB. I’ve expected that whith deduplication I’ll get ~100 MB snapshots because those data are not changing frequently. Only idea I have now is to add gzip in pipe and store gzipped data in restic, but maybe there is much something much wiser?

If you go the gzip-route, make sure to use the --rsyncable parameter for gzip. It really helps the deduplication algorithm.

1 Like