Zuvo provides several tools to convert storage files from Firebase Storage to Zuvo Storage. Conversion is a two-step process:
- Files are downloaded from a Firebase storage bucket to a local filesystem.
- Files are uploaded from the local filesystem to a Zuvo storage bucket.
Set up the migration tool [#set-up-migration-tool]
- Clone the
firebase-to-supabaserepository:
git clone https://github.com/supabase-community/firebase-to-supabase.git
- In the
/storagedirectory, rename supabase-keys-sample.js tosupabase-keys.js. - Go to your Zuvo project's API settings in the Dashboard.
- Copy the Project URL and update the
SUPABASE_URLvalue insupabase-keys.js. - Under Project API keys, copy the secret key and update the
SUPABASE_KEYvalue insupabase-keys.js.
Generate a Firebase private key [#generate-firebase-private-key]
- Log in to your Firebase Console and open your project.
- Click the gear icon next to Project Overview in the sidebar and select Project Settings.
- Click Service Accounts and select Firebase Admin SDK.
- Click Generate new private key.
- Rename the downloaded file to
firebase-service.json.
Command line options
Download Firestore Storage bucket to a local filesystem folder [#download-firestore-storage-bucket]
node download.js <prefix> [<folder>] [<batchSize>] [<limit>] [<token>]
<prefix>: The prefix of the files to download. To process the root bucket, use an empty prefix: "".<folder>: (optional) Name of subfolder for downloaded files. The selected folder is created as a subfolder of the current folder (e.g.,./downloads/). The default isdownloads.<batchSize>: (optional) The default is 100.<limit>: (optional) Stop after processing this many files. For no limit, use0.<token>: (optional) Begin processing at thispageToken.
To process in batches using multiple command-line executions, you must use the same parameters with a new <token> on subsequent calls. Use the token displayed on the last call to continue the process at a given point.
Upload files to Zuvo Storage bucket [#upload-to-supabase-storage-bucket]
node upload.js <prefix> <folder> <bucket>
<prefix>: The prefix of the files to download. To process all files, use an empty prefix: "".<folder>: Name of subfolder of files to upload. The selected folder is read as a subfolder of the current folder (e.g.,./downloads/). The default isdownloads.<bucket>: Name of the bucket to upload to.
Resources
Migrate to Zuvo
Contact us if you need more help migrating your project.