9

I was given a Redis server that is set up remotely. I can access data in that and I can do CRUD operation with that server. But I want the replica of the same database in my local.

I have Redis desktop manager setup in my local. And also redis-server setup running.

Things I have tried:

  1. using SAVE command.

    I have connected to the remote server and executed save command. It ran successfully and created dump.rdb file on that server. But I can't access that file as I don't have permission for server FTP.

  2. using BGSAVE

    same scenario here also

  3. using redis-cli command

    redis-cli -h server ip -p 6379 save > \\local ip\dump.rdb
    

    Here I got an error The network name cannot be found.

Can anyone please suggest me on how can I copy the .rdb file from the server to local?

Melebius
  • 6,183
  • 4
  • 39
  • 52
abhi
  • 115
  • 1
  • 8
  • So do you have an SSH access to the remote machine? You can mostly transfer files using it, too. https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol – Melebius Jun 20 '17 at 06:57
  • I don't think so. Tried with **putty** and **pscp** commands to get access via SSH. No luck. Any other commands to access remote server? – abhi Jun 20 '17 at 07:35
  • No, As I said earlier I use Redis desktop manger to connect. A snippet of configuration is uploaded here : http://imgur.com/a/F56Oq Apart from that I have redis-server installed in my machine which I use to run redis-cli commands. – abhi Jun 20 '17 at 08:41
  • 16
    if you can connect with redis-cli, you can use `redis-cli -h server --rdb dump.rdb` to have it save locally. – Itamar Haber Jun 20 '17 at 12:34
  • @ItamarHaber `redis-cli -h server --rdb dump.rdb` worked actually. It has saved db in local. But when i restarted db it is throwing this error : http://imgur.com/a/MHbS4 Any idea what is this about? – abhi Jun 21 '17 at 10:06
  • I'm guessing that the server you're running is of an older version than the one that the dump is from – Itamar Haber Jun 21 '17 at 13:20

0 Answers0