S
Supabase5d ago
MaxL

What is the best way to generate a working seed file(s) for a localhosted db in 2025?

I have done the bulk of my development using the remote database connection. I am now looking to emulate my remote with localhost for testing purposes. i have successfully been able to sync my schema with local, and I can set up my sign-in with the config.toml file, but I haevnt been able to create my seed data. For context this is a typical "SaaS" structure project where there are organizations, and data related to specific organizations. I have tried doing supabase --db-dump --data-only but this has failed every single time when recreating the database due to various policy constraints, and/or misc errors. (see attatched) The supabase docs for creating seed data reccomend using snaplet: https://supabase.com/docs/guides/local-development/seeding-your-database I havent seen a single reddit, discord, or blogpost referencing snaplet for seeding data in the last ~10 months. It seems like the OS codebase for snaplet is also out of date? Bottom line: whats the best way to pull a rather large dataset from a staging remote db to localhost for testing? Thanks! Note: I am unsure if the error logs I just attetched are even related to the seed data. It seems to be related to the supabase CLI not able to find the profile file in the .temp folder. I have no idea why its not generating it or how to debug this.
Seeding your database | Supabase Docs
Populate your database with initial data for reproducible environments across local and testing.
5 Replies
silentworks
silentworks5d ago
The .profile message is only a info thing and you don't need to worry about it. The issue you are having is related to https://discord.com/channels/839993398554656828/1440020448355160134
MaxL
MaxLOP5d ago
oh ugh this is still happening? also do you have any advice about the seeding strategy?
silentworks
silentworks5d ago
I tend to create seed data manually using something like faker with a few scripts. This way my development env is not with real data from production env.
MaxL
MaxLOP5d ago
https://fakerjs.dev/ is this what you’re referring to?
FakerJS
Generate massive amounts of fake (but reasonable) data for testing and development.
silentworks
silentworks5d ago
Yeah that's the one

Did you find this page helpful?