title: Backing up sqlite DB on iOS
body: <p>I would like to make backup copies of my app's main sqlite DB while my app is running.  </p>
  
  <p>1) I have read that it is safe to just copy the sqlite file if the DB has been checkpointed (at that point the wal file contains no important data).  Does [managedContext save:] do that checkpointing, or is there something else I have to do?  (ref <a href="https://stackoverflow.com/questions/12928294/shm-and-wal-files-in-sqlite-db">-shm and -wal files in SQLite DB</a>)</p>
  
  <p>2) Is there any way, short of tearing down the whole core data stack, to be sure that core data doesn't try to write to the sqlite file while I'm copying it?  My app does save frequently after any user input, and it would be nice if there was some way to force that to block for a second.</p>