Corrupted database lose 1 week data
Easy-to-use personal time tracking application for Windows and Unix
Brought to you by:
cesilko
Unexpected reboot corrupts the weekly diary database,
thus loosing the whole week data.
It would be better to have a daily database,
so only one day data would be lost,
or an automatic backup so restore is possible.
Thanks for the great tool.
I cannot live without it anymore !
Luc
Logged In: YES
user_id=1320671
Originator: NO
Hello Luc,
first of all thanks for your kind words. As for the problem it's very surprising because Rachota actually saves all data every 30 seconds so there should not be any data loss. Furthermore, if you launch Rachota, create some task, start to work on it and kill the application, Rachota should work fine next time you launch it and in addition to that it will offer you to add the downtime to the task you was working on when the crash happened.
So I would advise you to look for the diary file first. Maybe you just launched Rachota pointing it to some other location with no diary_????_??.xml files. Can you check this and let me know? Or even better can you please reproduce this defect? I would appreciate any steps to reproduce this malfunction.
Thanks for your report,
-Cesilko
Logged In: YES
user_id=1613632
Originator: NO
I had the same cause, but the effect was that the data file of the previous week was lost. Automatic backup helped me to restore the actual week's data file, but Rachota uses the previous week's file too. (I wasn't looking at the history when the crash happened. Rachota was running minimized.) And after the reboot Rachota says that one week is coruppted. (and it is, no useable data left in it.)
Logged In: YES
user_id=1583615
Originator: NO
I had the problem after closing the window and after the next restart. Below is my small rest of one week - the file is stripped at some point.
I could think the problem is related to a race condition when the JVM is stopped and the file is just being saved. One way to handle those conditions would be:
1) Write out a tmp-file
2) when the tmp file is completely written: delete the original file and rename the tmp to the original
This would prevent from data lost for this race condition even when the computer crashes in total.
... and thanks for this great tool... Jens
Here comes my stub:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Rachota 2.1 diary file - editing not recommended
Mon Oct 08 18:06:27 CEST 2007
-->
<!DOCTYPE week SYSTEM "diary.dtd">
<week year="2007" id="40">
<day id="1" start="12:17" finish="23:59">
<task state="1" duration="03:38:27">
<priority>1</priority>
<description>Bug fixing</description>
<keyword>dev</keyword>
</task>
<task state="1" duration="02:31:05">
<priority>2</priority>
<description>Leerlauf-Zeit</description>
<keyword>leerlauf</keyword>
Logged In: YES
user_id=1320671
Originator: NO
Jens, are you sure that your diary file was really corrupted? From the excerpt it is clear that you worked over midnight which was not well supported some time ago. The night shift support is available from build #070603 and newer.
As for your suggestion, you are right that now it simply overwrites existing file when saving diaries and no temporary approach is used. This is something I could improve to fix this bug which could hopefully satisfy original reporter.
I've seen this too, no idea what's caused it but the corrupted xml file appears to be incomplete. I'd attach it but sf is being weird.
Here is the complete contents of diary_2010_46.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Rachota 2.1 diary file - editing not recommended