Restoring redis data using redis-cli --rdb

5,276 views
Skip to first unread message

Astro

unread,
Dec 3, 2014, 5:04:45 AM12/3/14
to redi...@googlegroups.com


Hi,

I am trying to restore dump.rdb file into redis using redis-cli --rdb option. But ebery time it creates new dump.rdb (18b) file.

From redis documentation I found '--rdb <filename>   Transfer an RDB dump from remote server to local file' .

How can I restore the existing dump.rdb into redis using redis-cli?

Thanks,

Astro

Jan-Erik Rediger

unread,
Dec 3, 2014, 5:34:49 AM12/3/14
to redi...@googlegroups.com
--rdb only saves a RDB locally (server -> local file), it doesn't
restore it.

The easiest way is to transfer the RDB file to the server, place it in
the right path (as configured for your redis-server) and restart the
instance.
Redis will pick up the file and load it.

Another option would be to use the redis-rdb-tools[1] to convert the RDB
to a protocol stream and pipe that to 'redis-cli --pipe' to import it.

[1]: https://github.com/sripathikrishnan/redis-rdb-tools
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.

Astro

unread,
Dec 3, 2014, 6:58:20 AM12/3/14
to redi...@googlegroups.com
Hi janerik,


We are using Elasticache and have only endpoint to access the redis-server.

I just wanted to restore a dump on redis server. Copying rdb file into dbpath seems not feasible in this case.

Moreover Elasticache does not allow to store existing rdb to cluster.


Thanks
Reply all
Reply to author
Forward
0 new messages