Executing batches of commands using redis cli
Using heredoc works well here, if you don’t want to use echo
or explicitly add \n
or create a new file
Backup
This will create a dump.rdb
file in Redis directory (/var/lib/redis
).
Restore
Move dump.rdb
into Redis directory and start the server