Coder Social home page Coder Social logo

Comments (3)

dthyresson avatar dthyresson commented on July 22, 2024

Sorry, I just realized perhaps this issues is better listed in the cli repo. If so, let me know and I will move it.

But, one hiccup I did think of when restoring a db is if existing user credentials would be signed with a different GOTRUE_JWT_SECRET ... and if then one's local dev environment would have to use that value and thus potentially expose the secret to others without good reason.

from cli.

kiwicopple avatar kiwicopple commented on July 22, 2024

transferring!

from cli.

sweatybridge avatar sweatybridge commented on July 22, 2024

CLI v1 offers way to mirror your staging/production database locally. You can run the following commands to dump schemas locally after linking to a hosted project.

supabase link --project-ref <your_project>
supabase db remote commit

There are a few flags that we pass to pg_dump to ensure that restoring works. If you are using a manual dump, possibly from another postgres provider, you need to verify locally that the dump works by creating a new migration.

supabase migration new manual_dump < dump.sql
supabase db reset

If reset succeeds without error, you may push the schema to a new supabase project with supabase db push.

To restore seed data to local database, you can create a file under supabase/seed.sql containing insert statements. With #160, we hope to expose a way to push seed data to your hosted supabase projects as well.

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.