backup
Need Help with Backing Up and Restoring Local Supabase Storage Files (File Backend) to Avoid Missing xattrs
Hi! I'm self-hosting Supabase (Docker,
Setup:
Question: How do I backup/restore storage files to preserve
Thanks!
Hi! I'm self-hosting Supabase (Docker,
storage-api:v1.23.0, file backend) and can't restore local storage files to staging without losing xattrs, causing ENODATA errors when accessing images in Studio.Setup:
- Local: Storage at
/mnt/stub/stub. Files have xattrs (user.supabase.content-type="image/jpeg",user.supabase.cache-control="no-cache") viagetfattr. Images work in Studio. - Staging: Storage at
/var/lib/storage/stub/stub. Restored files showeinlsattrbut nouser.supabase.*xattrs, causing errors.storage.objectsentries are identical. - Backup: Used
tar -czf(Alpine, no--xattrs) anddocker cp, extracted on staging withtar --xattrs(Ubuntu container). Also restored DB withpg_dump. - Issue: Restored files lack xattrs; new uploads via Studio/Python script work fine.
Question: How do I backup/restore storage files to preserve
user.supabase.* xattrs? Should I use rsync -aAX, GNU tar --xattrs-include='user.supabase.*', or something else? Any tips for syncing storage.objects with files? Sample scripts appreciated!Thanks!