title: How do I back up Redis sever RDB and AOF files for recovery to ensure minimal data loss?
body: <h1>Purpose:</h1>
  
  <p>I am trying to make backup copies of both dump.rdb every X time and appendonly.aof every Y time so if the files get corrupted for whatever reason (or even just AOF's appendonly.aof file) I can restore my data from the dump.rdb.backup snapshot and then whatever else has changed since with the most recent copy of appendonly.aof.backup I have.</p>
  
  <h1>Situation:</h1>
  
  <p>I backup dump.rdb every 5 minutes, and backup appendonly.aof every 1 second.</p>
  
  <h1>Problems:</h1>
  
  <p>1) Since dump.rdb is being written in the background into a temporary file by a child process - what happens to the key changes that occurs while the child process is creating a new image? I know the AOF file will keep appending regardless of the background write, but does the new dump.rdb file contain the key changes too?</p>
  
  <p>2) If dump.rdb does NOT contain the key changes, is there some way to figure out the exact point where the child process is being forked? That way I can keep track of the point after which the AOF file would have the most up to date information.</p>
  
  <p>Thanks!</p>