Database Backup Transfer Time Estimation
Estimate how long database backups take to transfer over the network. Covers PostgreSQL, MySQL, and MongoDB dump sizes with compression ratios.
Detailed Explanation
Database Backup Transfer Estimation
Database backups combine two operations: dumping data to a file and transferring that file. The transfer time depends on the compressed dump size and available bandwidth.
Typical Dump Sizes and Compression
| Database Size (Raw) | Uncompressed Dump | gzip Compressed | zstd Compressed |
|---|---|---|---|
| 10 GB | 8-12 GB | 2-4 GB | 1.5-3 GB |
| 100 GB | 80-120 GB | 20-40 GB | 15-30 GB |
| 1 TB | 800 GB - 1.2 TB | 200-400 GB | 150-300 GB |
Compression ratios vary dramatically based on data content:
- Text-heavy data (logs, documents): 5:1 to 10:1
- Mixed data (typical OLTP): 3:1 to 5:1
- Binary/blob data (images, files): 1.5:1 to 2:1
- Already compressed data: ~1:1 (no benefit)
PostgreSQL Backup Example
For a 100 GB PostgreSQL database:
# pg_dump with compression
pg_dump -Fc mydb > backup.dump
# Typical size: ~25 GB (4:1 compression)
# Transfer time at 1 Gbps:
# 25 GB * 8 = 200 Gb
# 200 Gb / 1 Gbps = 200 seconds = 3 min 20 sec
Parallel Dump and Transfer
Modern backup tools can pipe dump output directly to a remote destination:
pg_dump -Fc mydb | ssh remote "cat > backup.dump"
This avoids needing local storage for the dump but is limited by the slower of: dump speed, network speed, or remote write speed.
Backup Window Planning
For a nightly backup window of 4 hours:
Available time: 4 hours = 14,400 seconds
At 100 Mbps (70% eff): 70 Mbps effective
Max transfer: 70 * 14,400 / 8 = 126,000 MB = ~123 GB
If your compressed backup exceeds 123 GB, you need more bandwidth, a longer window, or incremental backup strategy.
Use Case
DBAs planning backup schedules and retention policies, cloud migration architects estimating cutover times for database migrations, SREs designing disaster recovery procedures with specific RTO targets, and DevOps teams automating backup pipelines with transfer time monitoring.