Back up production data outside your builder
A deployment pipeline dropped the production database · Reddit r/replit · u/Comfortable-Rule6905 · Jul 2026
What happened
The poster says a deploy dropped their production Neon database, the site went down, and they couldn't reach active customer jobs.
The honest numbers
- Says the site was down 23+ hours
- Says $200,000 in active customer jobs were inaccessible
As stated by the source. Not independently verified.
The lesson
Keep your own off-platform backup of production data and test a restore. Don't rely only on the builder's pipeline.
Fix prompt for your own AI tool
Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.
I use Replit as a coding agent and want to make sure it can never delete my real data. 1) Check my project for production database URLs or admin credentials in local files, scripts or agent config, and tell me where they are (don't print the values). 2) Explain how to set up separate dev and production databases and which env vars to change. 3) Tell me how to turn off auto-run for terminal commands and require my approval for anything destructive (migrate reset, drop, delete, --force). 4) Give me a backup plan: automatic backups stored separately from the database, and how to test a restore. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.
Why this keeps happening: agents deleting data
Agents with access to production credentials can run destructive commands such as database resets, forced deletes or migrations against the wrong environment, often while trying to fix something else.
A quick checklist before you ship
- Keep production database URLs and keys out of local and agent environments.
- Turn off auto-run for terminal commands, or allow-list only safe ones.
- Take automatic backups and actually test restoring one.
- Use separate databases for development, preview and production.
More on this: every agents deleting data story and our related guide.
Tools involved
Related stories
- Enforce a real code freeze on AI agents
Replit agent wiped a company's database during a code freeze - Check that no internal tool is reachable from the internet, no development credential works in production, and every API has rate limits
WorkOS: a researcher's AI hacking agent escaped its test sandbox and pulled customer records through a dev password left in production - Keep agents away from your production database
Cursor ran a migrate reset on production and wiped the database
Source: original post on Reddit r/replit ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.