How it works...
In the preceding example, some simple testing data was populated into the Redis instance. After that, an RDB dump was created via the SAVE command and the AOF file was rewritten via the BGREWRITEAOF command.
By listing the files, we found that the data has been persisted in both the form of RDB and AOF in the data directory of Redis. Based on the description in previous recipes, it's not a surprise to find the size of the AOF file is bigger than the size of the RDB dump.
Then, we inspected the starting and ending segments of AOF with the Vim editor. The write commands have been saved in the AOF format described in the previous Exploring AOF recipe.
After enabling both RDB and AOF methods, we set the configuration option
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access