Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading or backing up entire storage bucket #363

Open
kurtdicus opened this issue Sep 3, 2023 · 1 comment
Open

Downloading or backing up entire storage bucket #363

kurtdicus opened this issue Sep 3, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@kurtdicus
Copy link

Improve documentation for Storage API while awaiting longer term solution for being able to download all files from storage buckets

User Problem

User would like to download all files from a storage bucket more easily.
User would like to backup storage buckets more easily.

Potential Solutions

  1. Client-side code using current API to list the contents of a bucket, downloading each file asyncronously, also using the API (see simple Node example below).
  2. Supabase could provide a new endpoint called something like .storage.from('mybucket').downloadAll() or .storage.from('mybucket').backup(). Future version request for options like {asSingleZipFile: true, callHookWhenComplete: 'https://myhook_to_call_when_complete', etc: 'etc'}.
  3. Alternatively, Supabase could provide a new endpoint called something like .storage.from('mybucket').createBackupFile('backups') which does the backend work to create a new file which gets placed into 'backups' storage bucket. Finally, the current .download() API endpoint could be used to get the backup file.

Simple example Node script for looping through entire storage folder and downloading each file asynchronously.
getBucketToLocalPath

@kurtdicus kurtdicus added the documentation Improvements or additions to documentation label Sep 3, 2023
@HighPriest
Copy link

Extending this request with "ListAll" endpoint, for listing all files with their full paths in a bucket.
supabase-community/storage-csharp#18

Thank you 🥰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants