beingkartik
beingkartik2y ago

Import data on prod

I want to import documents from local to prod, how can i do that? I am not able to setup convex for prod
22 Replies
jamwt
jamwt2y ago
hey! yep, you can use import/export to do this. see these docs: https://docs.convex.dev/database/import-export/import
beingkartik
beingkartikOP2y ago
I am not able to setup for prod Whats the step to use prod? @jamwt ?
jamwt
jamwt2y ago
npx convex deploy will push the current dev deployment codebase into prod then you can log into your dashboard and switch to "production" to see that deployment
jamwt
jamwt2y ago
CLI | Convex Developer Hub
The Convex command-line interface (CLI) is your interface for managing Convex
jamwt
jamwt2y ago
npx convex import supports a --prod flag as you can see here
jamwt
jamwt2y ago
so that you can import your tables in the production deployment
beingkartik
beingkartikOP2y ago
gotcha thanks and to use prod table data do i need to do something? @jamwt
erquhart
erquhart2y ago
The CONVEX_URL variable controls which deployment your frontend accesses
erquhart
erquhart2y ago
You'll want to check out the hosting and deployment guide to get going in production: https://docs.convex.dev/production/hosting/
Hosting and Deployment | Convex Developer Hub
Share your Convex backend and web app with the world.
beingkartik
beingkartikOP2y ago
I mean I want to test the prod data locally on my fe
erquhart
erquhart2y ago
Ah gotcha - yeah just update the environment variable
beingkartik
beingkartikOP2y ago
From where should I get the prod url?
erquhart
erquhart2y ago
It's in your dashboard, project settings
beingkartik
beingkartikOP2y ago
Generate product deploy key?
erquhart
erquhart2y ago
hmm actually no it's not there it's a template uses your project slug, finding the doc
beingkartik
beingkartikOP2y ago
how?
erquhart
erquhart2y ago
settings, under URL and Deploy Key what I'm seeing in the docs isn't matching what's in the dashboard oh, not project settings go to the project, and then hit Settings on the bottom of the left nav
erquhart
erquhart2y ago
No description
beingkartik
beingkartikOP2y ago
ohh got it
erquhart
erquhart2y ago
make sure you're in the production environment, not dev
beingkartik
beingkartikOP2y ago
yeah

Did you find this page helpful?