Comment 4 for bug 907781

Revision history for this message
Dolgener (dolgener) wrote :

Just to underline the importance, here is another way you can run into quite massive data loss trouble (at least with v. 1.40):

If your desktop or OS freezes for some other (e.g. hardware) reason and a current writing process is interrupted, the next time you start RedNotebook you'll get:

$ rednotebook
INFO Writing log to file "/home/user/.rednotebook/rednotebook.log"
INFO MathJax location: http://cdn.mathjax.org/mathjax/latest/MathJax.js
INFO Running in portable mode: False
INFO First Start: False
INFO RedNotebook version: 1.4.0
INFO System info: machine: i686, platform: Linux-3.0.0-1-686-pae-i686-with-debian-wheezy-sid, processor: , python_version: 2.7.3rc2, release: 3.0.0-1-686-pae, system: Linux, GTK version: (2, 24, 10), PyGTK version: (2, 24, 0), Yaml version: 3.10
INFO Cloud ignore list: [u'category', u'diese', u'einem', u'einen', u'einer', u'entries', u'entry', u'filtere', u'gegen', u'getrennten', u'hatte', u'kommas', u'mit', u'nicht', u'wolke', u'w\xf6rter']
INFO Cloud include list: [u'job', u'juli', u'mtv', u'spam']
INFO Using zeitgeist: False
INFO Opening journal at u'/home/user/.rednotebook/data'
ERROR Error in file /home/user/.rednotebook/data/2012-09.txt:
while scanning a quoted scalar
  in "/home/user/.rednotebook/data/2012-09.txt", line 85, column 11
found unexpected end of stream
  in "/home/user/.rednotebook/data/2012-09.txt", line 100, column 1

This affects any portion from the smallest unit being saved, in this case up to a month.

IMHO this damage could easily be prevented by saving the file in a transactional manner (delete old backup ; move old file to new backup ; then save new file) as e.g. kate/kwrite an other editors do. In that case, only few information would be lost that had been changed during the last auto save interval.

Of course downsizing the smallest unit of information (month -> day, as maybe V. 1.5. does) and maybe saving a undoable/redoable history in addition would greatly help, too. The latter theoretically might enable a complete recovery up to few keystrokes.

Hence, I'm looking forward to v. 1.5 (it has not yet arrived at debian/experimental).