Move from BackBlaze B2 to Digital Ocean Spaces


I’m pretty confusing with this situation right now. We have a BackBlaze B2 bucket for uploads. (images + assets) With BunnyCDN combo. B2 Cloud Storage doesn’t support tombstone. So we have lots of unused images and script. Now i want to migrate these uploads to Digital Ocean Spaces with the same BunnyCDN setup just change the origin url to DO.

We use this awesome guide to set up B2 Cloud Storage. And we want to change the DO version.

What is the best practice to do the migration? We have ~10gb uploads. B2 has Snapshot feature but that is soo slow. The console code rake uploads:migrate_from_s3 is first download everything from s3 and we need to rebake posts which is also really slow process because of the images. After this process we can upload everything to DO Spaces. Is that right?

What is happening if we make the Snapshot on B2 Cloud Storage after download it manually to the computer and upload everything to DO Spaces? After this process we modify the BunnyCDN pull zone origin url to DO Spaces + change app.yml file and rebuild. This way do we need rebake posts?

One more question… What happening with the unused files, images on DO Spaces? The system recognize these files and will delete them?

Thank you for every help with this :slight_smile:

I think the easiest way is to enable the hidden setting that downloads all the S3 files to a backup at the console (you’ll get to search here or look in the source), change to spaces, restore the backup, rebuild the container.

Remember to turn off the setting that downloads the images or you’ll download and upload all your uploads at every backup!

I’ve been wanting to figure this out for years, and my tests keep failing, I think for edge case reasons. Let me know if that works. You can test it out by restoring to a test site.


Thank you! :slightly_smiling_face: So this process backup everything from S3 also. This will Make a huge backup file on B2 Cloud Storage after download it to computer and before restore it change the app.yml file and cdn to point to DO Spaces? It will restore the files to DO Spaces.

But when I make the backup file the app.yml should contain the DO Spaces informations to restore the correct place. Or can I edit the app.yml file inside the backup after made it? :slightly_smiling_face:

Oh yes because I forget the backup is also on the B2 Cloud Storage. Just another bucket.

Good point. You’d change to do local backup.


I found this so i am just thinking what happened if migrate it to cloud to cloud and just change the CDN and app.yml file? Is it workable? :slight_smile: If it is, maybe this going to be the simplest and fastest solution for this process. They support BackBlaze too.

1 Like

I think that should work, and if the CDN is the same then I don’t think you’d need to touch the database.

1 Like

Yes same CDN just change the pull zone origin url to DO Spaces. :slight_smile:

1 Like

I found another way to do this what I will try first tomorrow.

  1. Rebuild the site using the new parameters
  2. Move files from the old storage to the new using the aws s3 cli
  3. Use a DbHelper.remap to remap the path from old storage to the new storage.

Thanks Falco I will try this! :heart::slightly_smiling_face:

I found information about remap process on #howto this

Now I just Google it how to use aws S3 cli. I hope I will find a step by step guide. Thanks. :slightly_smiling_face:


I did the migrate last night without any problem! :slight_smile: Thanks to Falco! :heart: DO Spaces fixes many errors what was before on B2 Cloud Storage and much faster too. Thank you for your help guys! :slight_smile:


Can you say more about the backblaze errors? I’ve been recommending it (though mostly for backups).

1 Like

We had lots of “url forbidden” warning from js files in logs. Now the logs clean. Sometimes the composer stucked and this kind of bugs. Now it is smooth and fast.

They never notify us when the api key expired. Which is one of the biggest problem. However on the B2 panel it says never expeire but it always expire after few month and broke our site. I think B2 has some downtime or something unstable thing because sometimes the upload images was broken.

I don’t know there was a push notification problem maybe that also cause this. But not sure we testing it now. :slightly_smiling_face:

For us this was a good choice to move Digitalocean spaces Frankfurt because our forum is also there. Faster and more stable until now. Hope it will be good for the future also. :slightly_smiling_face:


Great! Can you share the steps you took to do the migration?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.