Migrating from local storage to S3

Hey, I’m looking into options for migrating my old content that is currently on local storage to S3 bucket. I’ve seen some really old repos about this but I’m wondering if they still work or if there is something else newer with continuous support.

Thank you!

I was using GitHub - laosb/ghos3: A modernized AWS S3 storage adapter for Ghost. until last year. I think it still works with 2 remarks:

  1. When you serve your images from a different domain, you are not able to get the advantage of autoresizing images with img_url helper.
  2. There is an issue that blocks uploading zip files on Ghost import.

@muratcorlu What are you using now?

In Synaps Media, I’m directly writing to local disk and then syncing to an S3 bucket in background.

Interesting approach.
But then you load from the S3 or that is just a backup system?
What is the advantage vs a backup?

Yes, currently it’s like a realtime backup. Because I have large enough SSD disks, it doesn’t make sense to do all the reads and writes from an external storage. That would make image uploads and auto-resizes very slow. If your template uses img_url helper, when you upload an image, Ghost makes many reads/writes for generating required sizes for this image, with the requests coming from clients. If you always read/write from/to S3, regarding to original image size, these requests can take several seconds.

Main advantage of using a storage adapter for me would be to serve images and files from a separate domain. That would be most efficient way of serving static contents. But lack of the img_url helper on templates is a big blocker for this. Because even serving thumbnail images with full-sized images gives a much worse result than the advantage of serving images from a different domain.

1 Like