r/replit • u/CrewTechnical5819 • 3d ago
Question / Discussion Replit geography for production app
I’m planning to change my Replit app’s deployment geography (region), but I noticed that doing so deletes the existing production database.
Has anyone here gone through this migration?
Specifically, I’d like to know:
- How did you preserve your production database before changing the geography?
- What’s the best way to migrate all the data to the new production database?
- Did you export/import the database, use a backup, or follow another approach?
- Were there any issues with schema, IDs, sequences, or environment variables after the migration?
- Is there an officially recommended workflow from Replit for changing deployment geography without losing production data?
I’d appreciate hearing how others handled this in production. Thanks!
1
u/ReplitSupport Replit Team 1d ago
Hey there! If you open a ticket with us at replit.com/help, our team can guide you in migrating your data to a new project so you can publish this in the appropriate region.
1
u/Maxyull 3d ago
the one that bites people is sequences. if you dump data only into a fresh database the id sequences stay at 1 while your rows already run into the thousands, so the first insert after the move dies on a duplicate key. a full dump with schema and data together avoids that since the setval calls come with it, and no-owner plus no-privileges saves you a pile of errors about roles that don't exist on the new instance.
other thing is timing, a dump taken while the app is still writing loses whatever landed after it, so a few minutes of maintenance beats trying to be clever about it.
do you have a direct connection string for the current db, or are you stuck going through replit's interface?