How to protect data in SQLite database?

What can we do about the shortcomings related to data backups for desktop and web apps?

  • Data backups for certain desktop applications have a problem: if the app stores its data in some kind of database (e.g. sqlite), a naive backup of that database while the app is still running could be a corrupt file, because the database could be in the process of being modified when the backup takes place. Users may expect to simply be able to copy all their files onto a server, but for the reason I've just stated, this will not always work. Some will say "Use a web app instead". If you use a free web app, there is a different problem: typically you have no idea whether the web app provider is doing proper backups and verifying them. Yes, they'd be stupid not to, but some web app providers have been stupid in the past. Also, the backups may not be very frequent. Even Red Hat lost more than a day of data in its Bugzilla bug database once.

  • Answer:

    This is why Microsoft developed VSS, so that it would be possible to take consistent snapshots. On Linux you can sort-of do the same thing by taking an LVM snapshot and then mounting it somewhere. I wrote a bit about this (from the perspective of a server backup here: http://blog.ifost.org.au/2014/07/moment-in-time-snapshot-backups-of.html ).

Greg Baker at Quora Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.