How to Download Your Entire Supabase Storage Bucket Locally
Source: Dev.to
Introduction
If you’ve been building with Supabase, you know their Storage API is fantastic for web apps. Sometimes you just need your files on your local machine—for a manual backup, bulk editing, or migrating data. While you could write a script using the Supabase SDK, there’s a faster “no‑code” way: Cyberduck.
Note: Cyberduck is an official Supabase partner integration. It’s a secure, open‑source tool that Supabase recommends for managing storage via the S3 protocol. You can find the official integration page on Supabase’s docs.
Prerequisites
- Supabase project with Storage enabled.
- Cyberduck installed (download the latest version from the official download page).
- An S3 access key for your Supabase project.
Create an S3 Access Key
- Log in to your Supabase Dashboard.
- Navigate to Storage → S3 Settings (sidebar).
- Under Access Keys, click Create Access Key.
- Give it a description (e.g., “Local Backup”) and click Create.
- Important: Copy the Access Key ID and Secret Access Key immediately; you won’t be able to view the secret again.
Configure Cyberduck for Supabase
-
Create a file named
supabase.cyberduckprofileon your computer. -
Paste the following XML into the file:
<Profile> <Protocol>s3</Protocol> <Vendor>Supabase Storage S3</Vendor> <Scheme>https</Scheme> <Description>Supabase Storage (S3)</Description> <DefaultHostname>YOUR_PROJECT_REF.supabase.co</DefaultHostname> <DefaultPort>443</DefaultPort> <Region>YOUR_REGION</Region> <Properties> <Property key="s3.storage.class.options">STANDARD</Property> <Property key="s3.bucket.virtualhost.disable">true</Property> </Properties> <Context>/storage/v1/s3</Context> </Profile> -
Replace
YOUR_PROJECT_REFwith your project ID (found in your Supabase URL) andYOUR_REGIONwith the appropriate region (e.g.,ap-south-1). -
Save the file and double‑click it. Cyberduck will open and prompt for credentials. Enter the Access Key ID and Secret Access Key you generated earlier.
Download a Bucket Locally
- After connecting, you’ll see your Supabase buckets displayed like folders.
- Select the bucket you want to download.
- Right‑click the bucket and choose Download. Choose a destination folder on your machine; Cyberduck will handle the transfer.
Keep a Local Folder Synced (Mirror)
If you want to keep a local copy updated with the latest changes without re‑downloading everything:
- Right‑click the bucket (or the local folder) and select Mirror.
- Cyberduck will compare the remote and local contents and transfer only the differences.
Additional Use Cases for S3 Access via Cyberduck
- Bulk Uploads: Drag and drop thousands of assets (e.g., product images) directly into Supabase—more stable than the web dashboard for large volumes.
- Direct Media Editing: Some editors let you open a file from Cyberduck, edit it, and save it back to the cloud instantly.
- Cross‑Cloud Migration: Move files between AWS S3, Cloudflare R2, and Supabase by opening two Cyberduck windows and dragging between them.
- Infrastructure Testing: Verify S3 policies and IAM‑style permissions before writing any frontend code.