Capturing a Snapshot of a Redis Server in the CLI
Before you begin
Use ssh to log onto the server using a privileged account (this example uses the root account).
Start a Redis server as described in Starting a Redis Server.
Procedure
-
Determine the PID of the Redis server:
$ ps -elf | grep redis-server | grep -v grep 4 S root 21226 1 0 80 0 - 41302498 do_epo 09:35 ? 00:00:22 redis-server *:6385
-
Capture the snapshot:
$ mvmcli snapshot create -p 21226 -l redis-server-1 Dumping finished successfully Snapshot redis-server-1_20200528150207 created in 2872.97 ms, application frozen for 130.28ms.
The snapshot appears in the snapshot list (as the only snapshot, if this is the first time you've run the example). -
List the snapshot data directory:
# mvmcli snapshot list PID User Date Started Command ------------------------------------------------------------------- 21114 root Sun May 17 18:15:50 2020 /root/redis-5.0.7/src/redis-server *:6380 Snapshots: Date Created Status Label Sun May 17 18:25:54 2020 Persisted redis-test-1_20200528150207