Data loss

What data are lost when Zotero/Firefox/Linux/computer crashes? Is there any method to prevent loss of data (for example regular updating of SQLite database)? Are there any tools to recover data lost in a system crash? Thanks for a wonderful tool!
  • edited February 7, 2007
    A crash while Zotero isn't inserting data shouldn't have any effect whatsoever.

    Since SQLite is a journaled database, a crash while data is being written should also not cause problems, since the open, incomplete transactions would just be rolled back the next time Zotero opened. See File Locking And Concurrency In SQLite for more info, though note that mozStorage (SQLite in Mozilla) breaks some of the standard file locking that prevents external processes from accessing the database at the same timeā€”in other words, don't write to the DB from an external program while Firefox is open (and preferably, don't write to it at all).

    As for Zotero itself, on shutdown, Zotero verifies the integrity of the SQLite database and, if it's OK, copies it to a backup file in the Zotero directory. If the main DB file somehow becomes corrupted, the next time Zotero starts up, it will automatically attempt to restore from the backup file and save the damaged file to the Zotero directory. If both the main database and the backup are corrupted, Zotero has no choice but to archive the damaged file and create a new database.

    I don't know of any tools to repair or recover data from a damaged SQLite database, though some may exist. All data stored as strings would be visible with a text editor, but it surely wouldn't be pretty.

    We plan to make this a bit more robust in the near future by adding multiple backups (for example, having one backup a day that's not overwritten by restarting Zotero).

    Of course, we still highly recommend regular backups of the Zotero directory as part of a standard backup regimen (since, among other things, snapshots and imported files are not backed up by Zotero).
Sign In or Register to comment.