Comments (3)
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.
transferring!
from cli.
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)
- --env-file switch in functions serve fails, and .env ingestion in general is failing HOT 5
- Ability to lock the seed file to a migration version HOT 4
- Prevent accidental `db push` deployments to remote HOT 3
- Services getting exposed on network instead of only on localhost HOT 2
- Add missing `supabase db stop` command
- Add `supabase db shell` command to inspect databases
- `supabase stop --no-backup` unexpectedly creates backup HOT 5
- `supabase status` writes to stderr even without `--debug` flag HOT 3
- Allow enabling/disabling all services in the config.toml configuration HOT 1
- Can't link project (connect: no route to host) HOT 4
- Deno Config Support for IntelliJ IDEA/ Android Studio in supabase init HOT 3
- `npx supabase init --debug` fails when generating VS Code Settings for Deno HOT 2
- Failed to read env file: stat ./.env: no such file or directory HOT 1
- The CLI does not work in a Github Codespace HOT 4
- failed to create volume: Error response from daemon: create supabase_edge_runtime_<no value>: "supabase_edge_runtime_<no value>" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path HOT 1
- `supabase start`: Edge Runtime container fails with "Segmentation fault" HOT 3
- Cannot alter owner of view to `authenticated` HOT 2
- Connecting to localhost from within the db container not working HOT 1
- Support for database fixtures HOT 2
- `supabase start` fails with `Segementation fault` in `supabase_edge_runtime_<project>` after CLI upgrade HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.