Quantcast
Channel: Some confusion on backup whole data in redis - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Some confusion on backup whole data in redis

$
0
0

Document say:
Whenever Redis needs to dump the dataset to disk, this is what happens:
Redis forks. We now have a child and a parent process.
The child starts to write the dataset to a temporary RDB file.
When the child is done writing the new RDB file, it replaces the old one.


Because I want to backup whole data, I type shutdown command in redis-cli expecting it shutdown and save all data to dump.rdb.After it shutdown completely, I go to db location and see what happen that dimpr.rdb is 423.9MB and temp-21331.rdb is 180.5MB.Temp file is still exist and smaller than dimpr.rdb.Apparently, redis do not use temp file replaces dump.rdb.

I am wondering whether dump.rdb is whole db file at this time?And is it safe to delete the temp file.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images