Hacker News new | ask | show | jobs
by d34th0rl1f3 410 days ago
You can save time by using `zcat` instead of `cat` and skip the `gunzip my_local_database.db.txt.gz` step.
3 comments

Why would anyone use gzip instead of zstd in 2025? zstd is superior in every dimension.

gzip is a legacy algorithm that imo only gets used for compatibility with legacy software that understands nothing but gzip.

You don’t need cat at all for the restore. Can simply do:

sqlite3 data/database.db < “{backup_file}"

You could speed up by using pigz (parallel gzip) too.
If you're going to use a less universal tool for compression you might as well go with zstd.