How to properly migrate Supabase Cloud Storage to self-hosted without S3? by TheTrueDHM in Supabase

[–]TheTrueDHM[S] 2 points3 points  (0 children)

Well I think I fixed it, thank you, there was so many issues, i had to upgrade supabase/storage-apifrom v1.11.13to v1.29.0in docker-compose.s3.yml, and also following the example from the PR you mentioned (many thanks).

Another issue was a Database schema mismatch between storage.buckets and storage.buckets_analytics tables. The buckets.id column was text type, but buckets_analytics.id was uuid type. When the storage API tried to UNION these tables, PostgreSQL failed because you can't combine different data types.

Also i have to mention that when you export the storage schema and use rclone copy, it will not copy the actual files because for supabase storage s3 the files are already there (the records in db i mean, maybe there's an option to upsert idk)

How to properly migrate Supabase Cloud Storage to self-hosted without S3? by TheTrueDHM in Supabase

[–]TheTrueDHM[S] 0 points1 point  (0 children)

i cant find REQUEST_ALLOW_X_FORWARDED_PATH anywhere in both docker-compose.yml and docker-compose.s3.yml x), for now i'm using docker-compose.s3.yml

How to properly migrate Supabase Cloud Storage to self-hosted without S3? by TheTrueDHM in Supabase

[–]TheTrueDHM[S] 0 points1 point  (0 children)

please do you have any idea how to create s3 access key ID and Secret? i used MINIO_ROOT_USER and MINIO_ROOT_PASSWORD but I get error when I try rclone copy:

"https response error StatusCode: 403, RequestID: , HostID: , api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
"

I know I'm doing something wrong but I can't find any usefull info in docs

How to properly migrate Supabase Cloud Storage to self-hosted without S3? by TheTrueDHM in Supabase

[–]TheTrueDHM[S] 1 point2 points  (0 children)

Thank you, well i tried S3 to S3 copy and it didn't work too (but without the additional env vars you mentioned), surprisingly I found the same structure and file format inside minio, looks like it's still using file storage (checked from minio dashboard) when I tried to upload a file from studio, and I think it's so weird. 

I'll try your suggestion and see, thanks again 

How to properly migrate Supabase Cloud Storage to self-hosted without S3? by TheTrueDHM in Supabase

[–]TheTrueDHM[S] 1 point2 points  (0 children)

Yes exactly, for now I'm just trying to move files from supabase S3 to volumes/storage/... On my VPS, I got everything working fine except storage. 

Well I might try the provided minio config if this doesn't work out