This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Each time I open a document it is restored from the backup

Tags: None
(comma "," separated)
fluca1978
Registered Member
Posts
81
Karma
0
OS
Hi all,
I'm keeping my skrooge main file on an usb stick, under an encrypted partition (via truecrypt). Each time I open the file from skrooge I got this error message:

Code: Select all
[ERR-5]: Failed to open '/media/truecrypt1/luca/luca.skg'.
[ERR-10001]: no such table: doctransaction Unable to execute statement
[ERR-10001]: insert into doctransaction (d_date, t_name, i_parent) values ('2014-05-08 17:25:10','#INTERNAL#Migrate document', 0);


but after that the file appears to be correctly rebuilt, at least my last operations are all there. The file sizes are as follows:

Code: Select all
% ls -lh /media/truecrypt1/luca/luca*skg*                                                                     ~
-rwx------ 1 luca luca 1,1M mag  8 17:24 /media/truecrypt1/luca/luca.skg
-rwx------ 1 luca luca 1,1M mag  8 17:24 /media/truecrypt1/luca/luca.skg.old


I'm using 1.7.8 Beta on Kubuntu 13.04.
What I've noticed is that if I copy first the file on my hard disk I can open it without any error.
What could it be the problem?

In the meantime I'm downloading 1.9 as source to see if it still happens.

Thanks
fluca1978
Registered Member
Posts
81
Karma
0
OS
fluca1978 wrote:I'm using 1.7.8 Beta on Kubuntu 13.04.


Tha was 1.7.4.BETA, however even with 1.9.0 stable I got the following each time I open the document:

Code: Select all
Your document has been restored from its temporary file. You can decide to reopen the original document.


Now, is it something I should worry about? I would not discover one day the automatic backup is not working and all my operationsare lost.
fluca1978
Registered Member
Posts
81
Karma
0
OS
Another quick update: it seems that the message from 1.9.0 stable

Code: Select all
Your document has been restored from its temporary file. You can decide to reopen the original document.


appears each time I open a document from a folder that contains also the backup copy. In other words, it does not seem to matter if the file is on an USB stick or another place, rather if the backup (.old) file exists.
Seems to me each time Skrooge finds a backup file with a modification time newer than the document I'm opening it restores the document from the old backup copy. In other words, having this situation:

Code: Select all
% stat luca.skg*                                                                                          ~/tmp
  File: ‘luca.skg’
  Size: 1144850         Blocks: 2256       IO Block: 4096   regular file
Device: 17h/23d Inode: 2670704     Links: 1
Access: (0700/-rwx------)  Uid: ( 1000/    luca)   Gid: ( 1000/    luca)
Access: 2014-05-08 17:45:53.052195300 +0200
Modify: 2014-05-08 17:45:44.828195300 +0200
Change: 2014-05-08 17:45:44.828195300 +0200
 Birth: -
  File: ‘luca.skg.old’
  Size: 1146898         Blocks: 2264       IO Block: 4096   regular file
Device: 17h/23d Inode: 2672007     Links: 1
Access: (0700/-rwx------)  Uid: ( 1000/    luca)   Gid: ( 1000/    luca)
Access: 2014-05-08 17:45:44.828195300 +0200
Modify: 2014-05-08 17:45:44.864195300 +0200
Change: 2014-05-08 17:45:44.864195300 +0200
 Birth: -


make Skrooge restoring the document, while having touched the document and therefore having the following:

Code: Select all
% stat luca.skg*                                                                                          ~/tmp
  File: ‘luca.skg’
  Size: 1144850         Blocks: 2256       IO Block: 4096   regular file
Device: 17h/23d Inode: 2670704     Links: 1
Access: (0700/-rwx------)  Uid: ( 1000/    luca)   Gid: ( 1000/    luca)
Access: 2014-05-08 17:52:37.332195300 +0200
Modify: 2014-05-08 17:52:37.332195300 +0200
Change: 2014-05-08 17:52:37.332195300 +0200
 Birth: -
  File: ‘luca.skg.old’
  Size: 1146898         Blocks: 2264       IO Block: 4096   regular file
Device: 17h/23d Inode: 2672007     Links: 1
Access: (0700/-rwx------)  Uid: ( 1000/    luca)   Gid: ( 1000/    luca)
Access: 2014-05-08 17:45:44.828195300 +0200
Modify: 2014-05-08 17:45:44.864195300 +0200
Change: 2014-05-08 17:45:44.864195300 +0200
 Birth: -


makes it processing it regularly. Or at least this is what I'm able to reproduce. Is it a normal behavior? Please consider I've auto-backup enabled on exiting.

Thanks.
rbruce
Registered Member
Posts
57
Karma
0
OS
fluca1978 wrote:Hi all,
I'm keeping my skrooge main file on an usb stick, under an encrypted partition (via truecrypt). Each time I open the file from skrooge I got this error message:

Code: Select all
[ERR-5]: Failed to open '/media/truecrypt1/luca/luca.skg'.
[ERR-10001]: no such table: doctransaction Unable to execute statement
[ERR-10001]: insert into doctransaction (d_date, t_name, i_parent) values ('2014-05-08 17:25:10','#INTERNAL#Migrate document', 0);


but after that the file appears to be correctly rebuilt, at least my last operations are all there. The file sizes are as follows:

Code: Select all
% ls -lh /media/truecrypt1/luca/luca*skg*                                                                     ~
-rwx------ 1 luca luca 1,1M mag  8 17:24 /media/truecrypt1/luca/luca.skg
-rwx------ 1 luca luca 1,1M mag  8 17:24 /media/truecrypt1/luca/luca.skg.old




I looks like Skrooge knows that your data file is "dirty" by creating a hidden file called .<yourskroogefilename.>.skg.wrk when you open Skrooge then cleaning it up when you exit successfully. I assume that the program does this as the very last step in the shutdown process so that the .wrk file will be left behind if Skrooge terminates improperly (due to crash, abrupt computer shutdown, power fail, etc.) Next time Skrooge launches it looks for the hidden .wrk file to see if it needs to offer to restore the .old temp file. Do you have a .wrk file that persists after Skrooge closes?
fluca1978
Registered Member
Posts
81
Karma
0
OS
rbruce wrote:I looks like Skrooge knows that your data file is "dirty" by creating a hidden file called .<yourskroogefilename.>.skg.wrk when you open Skrooge then cleaning it up when you exit successfully. I assume that the program does this as the very last step in the shutdown process so that the .wrk file will be left behind if Skrooge terminates improperly (due to crash, abrupt computer shutdown, power fail, etc.) Next time Skrooge launches it looks for the hidden .wrk file to see if it needs to offer to restore the .old temp file. Do you have a .wrk file that persists after Skrooge closes?



Uhm...the following does not present any file like that:

Code: Select all
% find /media/truecrypt1/luca -name '*luca*wrk'


but when Skrooge starts it reports that the document has been migrated (is this related to recovering the file? It sounds strange to me that every time I start Skrooge it is migrating the document...).
Running Skrooge presents the working file:

Code: Select all
% find /media/truecrypt1/luca -name '*luca*wrk'                                                               ~
/media/truecrypt1/luca/.luca.skg.wrk


Once the program exits the file disappears, as it should be. So I suspect there could be a flushing problem on the USB disk in such cases where the file is not deleted or either the startup message about the migration is misleading.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]