Some confusion on backup whole data in redis -
document say:
whenever redis needs dump dataset disk, happens:
redis forks. have child , parent process.
child starts write dataset temporary rdb file.
when child done writing new rdb file, replaces old one.
because want backup whole data, type shutdown command in redis-cli expecting shutdown , save data dump.rdb.after shutdown completely, go db location , see happen dimpr.rdb 423.9mb , temp-21331.rdb 180.5mb.temp file still exist , smaller dimpr.rdb.apparently, redis not use temp file replaces dump.rdb.
i wondering whether dump.rdb whole db file @ time?and safe delete temp file.
what file mod timestamp of temp-21331.rdb say? sounds leftover crash. can delete it.
the documentation correct. when rewriting, info written temp file (compressed), , when complete, dump.rdb file replaced temp-file. there should no leftovers during normal usage. is important: need enough free disk space operation succeed. safe guideline is: 140% times redis memory limit (it 200% if no compression applied).
hope helps, tw
Comments
Post a Comment