DEV Community

Shashwat Diwan
Shashwat Diwan

Posted on

RelinkDB - auto db migration tool for free-tier services

If you run side projects, prototypes, or indie tools on Render's free tier, you already know the monthly headache: Render wipes free PostgreSQL databases every 30 days.

Forgetting the expiration date means losing live user data. Remembering it means a tedious manual dance of dumping SQL, spinning up a new database, restoring the data, and updating environment variables.

To fix this routine once and for all, I built RelinkDB.


๐Ÿ’ก What is RelinkDB?

RelinkDB is an automated, open-source desktop operator console and background worker built specifically for the Render free-tier Postgres renewal cycle.

Render blocks API-based creation of free resources, so you still have to click New โ†’ Postgres in the dashboard once a month. RelinkDB automates every single step around it, turning a 15-minute multi-step chore into a safe 2-minute workflow.


โœจ Key Features

  • โฑ๏ธ Expiry Countdown & Alerts: Get live visibility on your database age via the desktop console or an optional background worker process.
  • ๐Ÿ’พ One-Click Dump & Restore: Export your live database schema and data before it expires, then restore it directly to the newly provisioned instance.
  • ๐Ÿ”— Auto-Relinking: Automatically updates your backend web serviceโ€™s environment variables (DATABASE_URL) on Render and triggers a fresh redeploy instantly.
  • โšก Zero-Tool Fallback: Includes a pure-JS dump/restore fallback path using pg when local pg_dump tools aren't installed on your machine.
  • ๐Ÿ’ป Operator Desktop Console: Clean Windows desktop UI built with Electron for smooth local management.

๐Ÿ› ๏ธ How the Monthly Workflow Works

  1. Pull Fresh Data (npm run backup): Connects to your active database and dumps a complete data.sql snapshot.
  2. Recreate Instance (Manual): Delete the old DB on Render, click New โ†’ Postgres with the same name, and hit Create.
  3. Restore & Relink (npm run sync): RelinkDB detects the new instance, restores your backup, updates your app's environment variables, and redeploys your backend automatically.

๐Ÿ“ฆ Quick Start & Source Code

Check out the full setup instructions, build guide, and architecture details on GitHub:

๐Ÿ‘‰ GitHub Repository: RelinkDB

Feel free to drop a โญ๏ธ if you find it helpful, or open an issue/PR to contribute! Feedback and feature suggestions are always welcome.

Top comments (1)

Collapse
 
shashcodes profile image
Shashwat Diwan

Visit repo and help solve good first issues...Great for beginners in open source