On 12 Jul 2012, at 4:56 AM, villas wrote: > Regarding use with Apache wsgi and Sqlite. > > Does anyone know whether it is safe to copy a Sqlite DB file after Apache has > been stopped. I mean, would stopping Apache leave the DB file in a good > state for copying?
This issue is not so much Apache as any clients of the database potentially doing a write during your copy. Stopping Apache will stop your web2py app from writing on behalf of incoming requests, but not from (say) system cron, if you happened to be using that, or perhaps the scheduler. An alternative is to copying the file is to use the command-line interface (sqlite3) and its .backup command. There's also a backup API that you can use.

