Hi,
I'm looking for a recommended procedure to backup/restore redis with sentinel (aof = true, rdb = true), on a large data sets.
Thanks
Comment From: alita1991
Hi,
I have the following procedure in mind; could anyone please provide feedback on it?
a) Stop Redis Server on each node
b) Disable AOF + RDB snapshots on each Redis Server
appendonly no
save ""
b) Remove all files from the /data directory on each Redis Server
c) Copy the backup file on each Redis Server as /data/dump.rdb
d) Start Redis Server on each node
e) Recreate the AOF file on each Redis Server
redis-cli BGREWRITEAOF
f) Wait for AOF file to be completed on each Redis Server
redis-cli info | grep aof_rewrite_in_progress # Check the progress (0 – done, 1 – not yet)
g) Re-enable RDB + AOF and restart each Redis Server
Comment From: sundb
@alita1991 no sure i can follow you. are you want a version upgrade?
Comment From: alita1991
Hi @sundb
I created an RDB snapshot using the "redis-cli SAVE" command, which was saved as /data/dump.rdb. Now, I want to restore this snapshot to revert Redis to the state it was in at the time the snapshot was taken.
For a Redis Server with a single replica, I have a solution, but I could not find any documentation regarding how to execute the restore procedure on a configuration with 3 Redis Servers + 3 Sentinels.
During this procedure, the Redis Server version remains unchanged.
Thanks
Comment From: sundb
Hi,
I have the following procedure in mind; could anyone please provide feedback on it?
``` a) Stop Redis Server on each node
b) Disable AOF + RDB snapshots on each Redis Server appendonly no save ""
b) Remove all files from the /data directory on each Redis Server
c) Copy the backup file on each Redis Server as /data/dump.rdb
d) Start Redis Server on each node
e) Recreate the AOF file on each Redis Server redis-cli BGREWRITEAOF
f) Wait for AOF file to be completed on each Redis Server redis-cli info | grep aof_rewrite_in_progress # Check the progress (0 – done, 1 – not yet)
g) Re-enable RDB + AOF and restart each Redis Server ```
Yes, and you can also replace step e with config set appendonly yes which also execute bgrewriteaof.