Does any one know a way i can pull the strorage policies and push them to a new project

I have copied the storage tables/ and migrated the storage objects, but the polices are missing, any idea how i can grab those and create them in the new project
3 Replies
inder
inder2w ago
You can use supabase db dump command but you'll need to extract policies from this file yourself as it will dump everything about storage schema
supabase db dump --db-url <DB_URL> --schema storage -f "$(pwd)"/storage.sql
supabase db dump --db-url <DB_URL> --schema storage -f "$(pwd)"/storage.sql
inder
inder2w ago
For example:
No description
inder
inder2w ago
if the src and dest db versions are same then you can simply execute this whole file. you shouldn't face any issues

Did you find this page helpful?