delano / redis-dump

Redis to JSON and nack again
https://rubygems.org/gems/redis-dump
MIT License
818 stars 123 forks source link

select another database for import #27

Open polearnik opened 5 years ago

polearnik commented 5 years ago

I dump database 5 from server and I want to import to database 3 but command

cat db5.json | ./redis-load -d 3 not work. I need to replace in file "db":5, to "db":3, for successfully import. It needed to fix on use -d 3 to ignore database in file

shaoye commented 2 years ago

I figured to include the db number in the uri to make it work

i.e.

cat db5.json | redis-load -u 127.0.0.1:6379/3