1

I'm using ReJSON, which a modified_enhanced version of redis. I'm wondering if that can affect the functionment of the common command.
I would persist my data, to make so, I have created a custom volume. But the data doesn't persist when I stop, then restart my container. The official doc talks about a /data directory to bind in order to mount the volume.

I have tried to do:

~$ docker run --name rejson -d -p 6384:6379 -v $PWD/volumes:/data redislabs/rejson

I have also tested:

~$ docker run --name rejson -d -p 6384:6379 -v $PWD/volumes:/data redislabs/rejson --appendonly

doesn't work either,

any hint would be great,

thanks

Guy Korland
  • 9,139
  • 14
  • 59
  • 106
Webwoman
  • 10,196
  • 12
  • 43
  • 87

1 Answers1

2

Why not just following the example strictly?

docker run --name rejson -d -p 6384:6379 -v $PWD/volumes:/data redislabs/rejson --appendonly yes

There is yes argument in the example given. You mounts are correct.

grapes
  • 8,185
  • 1
  • 19
  • 31
  • thanks, now it didn't recognize the json commands anymore, it returns me `ERR unknown command json.get, with args beginning with: myVar` – Webwoman Mar 05 '19 at 16:32
  • @grapese how to pass that appendonly yes in kubernetes file ? – Harsh Manvar Apr 08 '19 at 17:40
  • 1
    I had this same problem with it not recognizing the JSON commands. I fixed it by repalcing `--appendonly yes` with `redis-server --loadmodule /usr/lib/redis/modules/rejson.so --appendonly yes`. It seems like passing the appendonly yes argument ate the argument that loads the JSON operations. – mlucy Apr 22 '21 at 23:53