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.