I'm using SQLite (via FMDB) with an on-disk database in several iOS apps.  In 
each case, the DB file is only used by the one app and there's no DB activity 
on background threads.  The apps have a backup feature (initiated by the user) 
that simply copies the database file.  There is no other activity (in my app) 
when the backup is started (all reads and writes would have been completed at 
least a few seconds earlier), and I'm not concerned about a power or system 
failure during the copy.  For a restore, the current DB is closed, then a 
backup file is copied in and opened.

I've been using this scheme for years without a problem.  But, should I flush, 
or close, or lock before the copy?

Jeff

Reply via email to