Migrating storage items from one project to another.
I have managed to create a new database, and push the roles/schema/data into it, along with the edge functions and any changes to the AUTH/Storage tables. Its all working, however the final piece for moving the storage files is failing with the error below, i have taken the script from the Supabase site https://supabase.com/docs/guides/platform/migrating-within-supabase/backup-restore at the bottom. Any ideas?
root:/opt/supabase-cli/supabase-storage-migrate# node migrate-storage.js
error getting objects from old bucket
node:internal/process/promises:392
new UnhandledPromiseRejection(reason);
^
UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".
at throwUnhandledRejectionsMode (node:internal/process/promises:392:7)
at processPromiseRejections (node:internal/process/promises:475:17)
at process.processTicksAndRejections (node:internal/process/task_queues:106:32) {
code: 'ERR_UNHANDLED_REJECTION'
}
Node.js v22.16.0
root:/opt/supabase-cli/supabase-storage-migrate# node migrate-storage.js
error getting objects from old bucket
node:internal/process/promises:392
new UnhandledPromiseRejection(reason);
^
UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".
at throwUnhandledRejectionsMode (node:internal/process/promises:392:7)
at processPromiseRejections (node:internal/process/promises:475:17)
at process.processTicksAndRejections (node:internal/process/task_queues:106:32) {
code: 'ERR_UNHANDLED_REJECTION'
}
Node.js v22.16.0
Learn how to backup and restore projects using the Supabase CLI