{
  "id": 8011360,
  "title": "A nightly pg_dump that fails with the reason, not with \"Network is unreachable\"",
  "url": "https://urgent.news/2026/09/17/a-nightly-pg-dump-that-fails-with-the-reason-not-with-network-is",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-17T11:00:28.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/daniel_pertu/a-nightly-pgdump-that-fails-with-the-reason-not-with-network-is-unreachable-4lg8"
  },
  "original_language": "en",
  "account": "Munchable's PostgreSQL database relies on a nightly pg_dump job to protect against data loss. This GitHub Actions workflow is straightforward and vocal: it dumps the database to Cloudflare R2, and if the process fails, platform emails the repository administrators. This article discusses the enhancements made to the backup process 27 minutes after its initial launch, as well as the checks that were present from the outset.\n\nTwo archives are created: a full backup containing every schema and row, including the catalog.products table, and a core backup that excludes catalog.products. The full backup is retained for approximately 30 days, while the core backup, which contains critical data such as accounts, entitlements, contribution rewards, and more, is kept for a year. The small archive is uploaded to R2's free storage tier, resulting in near-zero cost.\n\nThe backup process includes several checks. Firstly, a preflight step verifies the connection string before pg_dump begins, ensuring that any issues with the connection are identified early. Secondly, it checks if either dump is empty or if the archive is unreadable or truncated, using pg_restore --list to detect issues. Finally, it verifies that the core dump is smaller than the full one, catching any issues with excluded data.\n\nDespite the database provider offering managed backups, Munchable's independent backup job remains crucial for data hygiene. The database is dumped every night at 03:42 UTC, and the restore process has been tested. A previous post covered the deletion of 50,000 rows within a 60-second serverless function, further emphasizing the importance of data management.",
  "summary": "Munchable 's Postgres runs on a hosted tier that provides no managed backups. That makes a nightly GitHub Actions job the only line of defence against data loss, so the workflow is intentionally simple and loud: pg_dump to Cloudflare R2, and if it fails, the platform emails the repo admins. This post is about the checks that were added to it 27 minutes after it first shipped, and the ones that…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}