#Data Transfer from one Env. to another in payload

7 messages · Page 1 of 1 (latest)

plucky carbon
#

I have one database for a Payload instance, let's say the development environment, and another database for a different Payload framework instance in the production environment. How can I transfer all my data from the development environment to the production environment using payload framework?

winter mulchBOT
fallow bough
plucky carbon
#

Dumping and restoring data might be risky since my production website is actively running on a production server. I need a more robust and reliable solution to ensure data integrity without downtime.

fallow bough
#

You can do it while it's running. It would be super fast compared to any other solution. But you could always write a script that connect to your database, extract the data and insert it into the other one

kind forge
#

Yeah really the best and most robust way to do this is with a proper migration using the dump and restore method that @fallow bough mentioned.

#

If your migrating from say mongo to Postgres you’ll need to write a pretty complex script, I’ve done that before. Otherwise I can attest to simply copying a dev db onto a production one, having done the dump and restore method with both mongo and Postgres successfully before.