Snapshot takes the data as it exists at one moment in time & writes it to the disk, will be written to the file referenced as â€œdbfilenameâ€.
There are 5 steps to initiate snapshots.
a. BGSAVE: When redis client initiate BGSAVE, redis will create a fork so that child process will write a the snapshot to the disk where master interacts with commands.
b. SAVE: When redis client initiate SAVE, redis will stop responding any commands until snapshot completes
c. From Configuration Files:
Example: Configuration as SAVE 60 10000
BGSAVE will be called if 10000 writes occure within 60 seconds
d. SHUTDOWN: When redis client sends a SHUTDOWN, redis will perform SAVE operations, blocks all operations, shutdowns later.
e. Sync with other Redis: If a Redis server connects to another server, it issues SYNC, then master Redis will start BGSAVE.
Posted Date:- 2021-11-15 06:45:56