© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•6mo ago•
1 reply
nonogaki9674

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,
storage-api:v1.23.0
storage-api:v1.23.0
, file backend) and can't restore local storage files to staging without losing xattrs, causing
ENODATA
ENODATA
errors when accessing images in Studio.

Setup:
- Local: Storage at
/mnt/stub/stub
/mnt/stub/stub
. Files have xattrs (
user.supabase.content-type="image/jpeg"
user.supabase.content-type="image/jpeg"
,
user.supabase.cache-control="no-cache"
user.supabase.cache-control="no-cache"
) via
getfattr
getfattr
. Images work in Studio.
- Staging: Storage at
/var/lib/storage/stub/stub
/var/lib/storage/stub/stub
. Restored files show
e
e
in
lsattr
lsattr
but no
user.supabase.*
user.supabase.*
xattrs, causing errors.
storage.objects
storage.objects
entries are identical.
- Backup: Used
tar -czf
tar -czf
(Alpine, no
--xattrs
--xattrs
) and
docker cp
docker cp
, extracted on staging with
tar --xattrs
tar --xattrs
(Ubuntu container). Also restored DB with
pg_dump
pg_dump
.
- Issue: Restored files lack xattrs; new uploads via Studio/Python script work fine.

Logs (staging):
{"level":50,"time":"2025-08-20T14:30:45.409Z","error":{"message":"The extended attribute does not exist.","code":"ENODATA"},"operation":"storage.object.get_authenticated"}
{"level":50,"time":"2025-08-20T14:30:45.409Z","error":{"message":"The extended attribute does not exist.","code":"ENODATA"},"operation":"storage.object.get_authenticated"}


Question: How do I backup/restore storage files to preserve
user.supabase.*
user.supabase.*
xattrs? Should I use
rsync -aAX
rsync -aAX
, GNU
tar --xattrs-include='user.supabase.*'
tar --xattrs-include='user.supabase.*'
, or something else? Any tips for syncing
storage.objects
storage.objects
with files? Sample scripts appreciated!

Thanks!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Backup
SupabaseSSupabase / help-and-questions
8mo ago
supabase backup
SupabaseSSupabase / help-and-questions
2w ago
Backup query
SupabaseSSupabase / help-and-questions
3w ago
Download Backup
SupabaseSSupabase / help-and-questions
5w ago