So we use Sidekiq as our queue managing system in our Rails application. We also use Sidetiq to manage scheduled and recurring tasks.
At the moment there is around 200-300 scheduled tasks that will run anytime from couple of minutes to 30 days.
I would transfer just Redis database rdb file but due to some configuration changes, Rails project path has changed (hence tasks will not be able to run anymore)
What would be a preferred way to transfer whole scheduled tasks queue to work with new project path and manually is not the case.
My main concern was I thought that I couldn't just copy redis database because path of my project changes but as it turned out, it wasn't an issue.
Fastest way to replicate db for me was to first bind redis on old server to either it's IP or 0.0.0.0
and then on new server run
redis-cli slaveof OLD_SERVER_IP 6379
and then when everything is copied (copying is done in matter of seconds), run
redis-cli slaveof no one
Tada. Your Redis db is fully replicated.