March 2018
Beginner to intermediate
308 pages
8h 23m
English
Taking a backup of the current state of a Redis instance is a fairly simple matter. It involves forcing the contents of RAM to be persisted to disk and copying the resulting dump.rdb file to another location.
First, let's check the last time the contents of our Redis instance were written to disk. We can do that with the lastsave command in the redis-cli:
127.0.0.1:6379> lastsave (integer) 1501703515
This command returns the UNIX epoch timestamp of the last time the instance's data was persisted to disk.
Next, let's ensure that the contents of our Redis instance have been written to disk. We can do that with the bgsave command ...
Read now
Unlock full access