O'Reilly logo

Instant Redis Persistence by Matt Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Ensuring data integrity (Simple)

If you want Redis' rich data types and atomic operation, but really need your data to survive forever, you'll want to use an Append Only File (AOF). By configuring Redis to write every change to a disk as soon as it happens, you'll be absolutely guaranteed that nothing gets lost at the cost of a slight performance penalty.

It's important to note that this recipe is intended to be used on brand new Redis servers that don't already have data put into them. Attempting to enable AOF with the method described here on Redis servers that have existing data will cause data loss. If you have an existing database, take a look at the Enabling AOF with existing data recipe later in the book.

How to do it...

  1. Ensure you have enough ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required