beingkartik
beingkartik12mo 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
jamwt12mo ago
hey! yep, you can use import/export to do this. see these docs: https://docs.convex.dev/database/import-export/import
beingkartik
beingkartikOP12mo ago
I am not able to setup for prod Whats the step to use prod? @jamwt ?
jamwt
jamwt12mo 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
jamwt12mo ago
CLI | Convex Developer Hub
The Convex command-line interface (CLI) is your interface for managing Convex
jamwt
jamwt12mo ago
npx convex import supports a --prod flag as you can see here
jamwt
jamwt12mo ago
so that you can import your tables in the production deployment
beingkartik
beingkartikOP12mo ago
gotcha thanks and to use prod table data do i need to do something? @jamwt
erquhart
erquhart12mo ago
The CONVEX_URL variable controls which deployment your frontend accesses
erquhart
erquhart12mo 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
beingkartikOP12mo ago
I mean I want to test the prod data locally on my fe
erquhart
erquhart12mo ago
Ah gotcha - yeah just update the environment variable
beingkartik
beingkartikOP12mo ago
From where should I get the prod url?
erquhart
erquhart12mo ago
It's in your dashboard, project settings
beingkartik
beingkartikOP12mo ago
Generate product deploy key?
erquhart
erquhart12mo ago
hmm actually no it's not there it's a template uses your project slug, finding the doc
beingkartik
beingkartikOP12mo ago
how?
erquhart
erquhart12mo 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
erquhart12mo ago
No description
beingkartik
beingkartikOP12mo ago
ohh got it
erquhart
erquhart12mo ago
make sure you're in the production environment, not dev
beingkartik
beingkartikOP12mo ago
yeah

Did you find this page helpful?