Backup Redis

doanhtu07HOBBY

5 months ago

Project ID: 39ed518c-a714-4809-85db-fca88fd44e71

I saw a blog on getting rdb file from Redis instance on Railway at https://www.bing.com/search?pglt=2339&q=railway+backup+redis+ask&cvid=1739c3641d5e429c952e419172635812&gs_lcrp=EgRlZGdlKgYIABBFGDkyBggAEEUYOdIBCDU0MjdqMGoxqAIAsAIA&FORM=ANNTA1&PC=U531

This makes sense. But it doesn't provide a way to restore that rdb file back to Railway Redis instance like the way this blog provides (https://blog.railway.com/p/postgre-backup). From what I researched, there are couple of ways to restore Redis:

  1. Convert rdb file to protocol file and pipe from this https://github.com/sripathikrishnan/redis-rdb-tools, but this library is no longer maintained for a long time.

  2. Use Redis RIOT like this https://github.com/redis/riot?tab=readme-ov-file, but this library does not support importing rdb. It only supports import and export with JSON, XML, … formats. I'm not sure if backing up Redis instance in JSON form is recommended or not.

  3. I also found this alternative tool https://github.com/leonchen83/redis-rdb-cli, which is newer than redis-rdb-tools. Do you know of this?

  4. Restore rdb the classic way which is copying it to redis dir. But Railway Redis runs in Docker, and I don't see too many docs on how to ssh or changing the Redis Dockerfile. So I'm kinda clueless on this.

If anyone knows the best way to do this. Please let me know. Thanks!

Solved

0 Replies

5 months ago

I say don't worry about any of that, enable redis syncing to disk and enable scheduled backups on railway


5 months ago

!s


Status changed to Solved brody 5 months ago


Backup Redis - Railway Help Station