Setting up production clones for PR environments

Hi, wanted to know if anyone has experiences setting up clones of production for preview environments. I know it clones all your infrastructure including the database, but how do I get access to a backup of the production environment’s database?

I’d see if there was something I can do with the CLI tools, but those won’t install on my machine so stuck in the looking for strategies others have employed.

Hi there,

You can add an initialDeployHook to your blueprint that could seed your Preview Environment database. See https://render.com/docs/preview-environments#preview-environment-initialization for more information.

It would be up to your script to read straight from your production database or know where to find seed data. Depending on your use case/industry, you may want to use something other than production data for staging servers.

Regards,

Matt

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.