How to migrate from Cloudinary to S3


How does one trigger mirroring from Cloudinary to S3?

I have read the guide to change storage, but

attacher.file.trigger_mirror_upload returns nil no job is triggered.

Here is my config for the shrine.rb

Shrine.storages = {
  cache: "cache", public: true, **s3_options),
  store: true, prefix: "store", **s3_options),
  cloudinary_cache: "cache", resource_type: "video"), # for direct uploads
  cloudinary_store: true, resource_type: "video"),
  bb_video_cache: true, **backblaze_cache_options),
  bb_video_store: true, **backblaze_store_options)

Shrine.plugin :mirroring, mirror: { store: :bb_video_store }

Here is the migration.rb file

Video.find_each do |video|
    attacher = video.file_attacher
    next unless attacher.stored?

what am I missing here?

nvm. figured it out, The mirror plug should be

Shrine.plugin :mirroring, mirror: { cloudinary_store: :bb_video_store }

then attacher.file.trigger_mirror_upload will run