Repository Presets
PostgreSQL pg_dump Streaming Pipe in Borgmatic YAML
Eliminate staging disk space and achieve chunk-level SQL deduplication using Borgmatic native postgresql_databases streaming hooks.
Zero Temp Disk · 2.1x SQL Dedup · Streamed FIFO Pipe
Why format: plain vs format: custom Matters for Dedup
Uncompressed pg_dump plain text or uncompressed custom archives allow Borg's buzhash content-defined chunker to deduplicate unchanged table blocks across daily runs. Never pre-gzip pg_dump output before handing it to Borg.
Pairing High-Frequency Source Nodes with Slice Storage
Running pg_dump + zstd,3 on a 3.8+ GHz Vultr High Frequency node saturates gigabit uplinks while offloading multi-terabyte history to a $6/TB InterServer Storage Slice.
Measured Thresholds & Borgmatic Configuration
| YAML Directive | Recommended Value | Impact |
|---|---|---|
| postgresql_databases | name: all / format: custom | Streams binary pg_dump over FIFO directly into Borg chunker |
| Compression Choice | zstd,3 or zstd,6 | Shrinks unencrypted SQL/custom dumps by ~1.8x to 2.1x before SSH |
| Point-in-Time Safety | Consistent transaction snapshot per DB | Avoids corrupt partial table dumps under active write traffic |
| Restore Command | borgmatic restore --database all | Automated single-command recovery straight from remote slice |