© Kevin Languedoc 2016

Kevin Languedoc, Build iOS Database Apps with Swift and SQLite, 10.1007/978-1-4842-2232-4_11

11. Backing Up SQLite Databases

Kevin Languedoc

(1)Montreal, Canada

  • Copy contents to new database

  • Backing up on-disk databases

  • Backing up in-memory databases

Overview of the SQLite Backup Methods

Prior to the introduction of the Backup API, the only way to perform a backup was to make a copy. While this is still a viable option, it does have its drawbacks, like trying to make a copy while there is a lock on the open database, for instance. Another drawback is if the app stops running before the copy is finished, the app would need to delete the copy and start over. In addition to those two examples, there are numerous ways a copy process ...

Get Build iOS Database Apps with Swift and SQLite now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.