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

Always recovering from backup file

Tags: None
(comma "," separated)
fluca1978
Registered Member
Posts
81
Karma
0
OS

Always recovering from backup file

Mon Dec 01, 2014 1:49 pm
Hi all,
I'm using 1.9.0 on Kubuntu 12.04 on two different machines, and I'm pretty sure the versions are the same on both of even the libraries.
My skrooge file is on an USB stick. On the main computer all works fine. On the secondary computer each time I open the file skrooge tells me it has recovered from the backup file. No data is loss, but the behavior is always the same.
Is there a way I can investigate to report back this issue and see what the problem is?
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Hi,

First, I need to explain you how Skrooge works.
Imagine that you want to open a file on your usb key named test.skg, Skrooge will:
1-Copy and decrypt test.skg in .test.skg.wrk
2-Open the database .test.skg.wrk
3-This database is modified when you do a modification in Skrooge
4-When you save the file then Skrooge copies and encrypt .test.skg.wrk in test.skg
5-When you leave Skrooge, .test.skg.wrk is removed

In case, of crash, because .test.skg.wrk is still existing, Skrooge informs you about the recovery (this is not a backup).

Could you check on your USB key if the .XXXX.wrk (with XXXX equal to your skrooge file name) file is existing ?


Skrooge, a personal finances manager powered by KDE
Image - PayPal
fluca1978
Registered Member
Posts
81
Karma
0
OS
smankowski wrote:Could you check on your USB key if the .XXXX.wrk (with XXXX equal to your skrooge file name) file is existing ?


No, there is no file .wrk in the folder of my skrooge file, but please note that I'm not using encrypted files (because the usb key as a whole is encrypted).
This is the situation before opening skrooge on the faulty machine:

Code: Select all
$ ls -al *.skg*
-rwx------ 1 luca luca 1020946 dic  9 08:21 luca.skg


Then I open the file in skrooge and get the alert about recovering from the backup file, and the usb disk situation is the same:

Code: Select all
$ ls -al *skg*
-rwx------ 1 luca luca 1020946 dic  9 08:21 luca.skg


I made some changes and save the file, the final situation, after exiting skrooge is this:

Code: Select all
$ ls -al *skg*
-rwx------ 1 luca luca 1022994 dic  9 17:29 luca.skg


Now, without unmounting the usb key, reopening skrooge and the file prompts me again for the file being restored from the backup. The following is the output of the skrooge command run in console, in the case it can be useful:

Code: Select all
$ skrooge
##WARNING: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
##WARNING: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
##WARNING: Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
##WARNING: Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
##DEBUG: "/org/freedesktop/UDisks2/drives/PIONEER_DVD_RW_DVRTD08RS_PIONEER_DVD_RW_DVRTD08RS" : property "Drive" does not exist
##DEBUG: "/org/freedesktop/UDisks2/drives/Hitachi_HTS543225L9A300_090223FB2K00LEDBB2PA" : property "Drive" does not exist
##DEBUG: "/org/freedesktop/UDisks2/drives/JetFlash_Transcend_16GB_QIHMPTSC" : property "Drive" does not exist
##DEBUG: "/org/freedesktop/UDisks2/drives/Hitachi_HTS543225L9A300_090223FB2K00LEDBB2PA" : property "DeviceNumber" does not exist
##DEBUG: "/org/freedesktop/UDisks2/drives/Hitachi_HTS543225L9A300_090223FB2K00LEDBB2PA" : property "Device" does not exist
##DEBUG: "/org/freedesktop/UDisks2/block_devices/dm_2d0" : property "Name" does not exist
##DEBUG: "/" : property "DeviceNumber" does not exist
##DEBUG: "/" : property "Device" does not exist
##DEBUG: "/" : property "MediaCompatibility" does not exist
##DEBUG: "/" : property "MediaRemovable" does not exist
##DEBUG: "/" : property "Removable" does not exist
##DEBUG: "/" : property "ConnectionBus" does not exist



Any idea?

Luca
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Hi Luca,

Could you reopen do that on your usb key?
1-Close Skrooge
2-Run "ls -al .*.skg* *.skg"
3-Open Skrooge and open the document from the key
4-Run "ls -al .*.skg* *.skg"
5-Close Skrooge
6-Run "ls -al .*.skg* *.skg"
7-Send me the result of 2, 4 and 6


Skrooge, a personal finances manager powered by KDE
Image - PayPal
fluca1978
Registered Member
Posts
81
Karma
0
OS
Sorry for late replying, however the following is what you asked me for.
Before opening skrooge:

Code: Select all
$ ls -al *.skg*
-rwx------ 1 luca luca 1037330 dic 27 18:30 luca.skg
-rwx------ 1 luca luca 1036306 dic 27 18:30 luca.skg.old


then I start skrooge and open the document:

Code: Select all
$ ls -al *.skg*
-rwx------ 1 luca luca 1037330 dic 27 18:30 luca.skg
-rwx------ 1 luca luca 1036306 dic 27 18:30 luca.skg.old


and then I quit skrooge:

Code: Select all
$ ls -al *.skg*
-rwx------ 1 luca luca 1037330 dic 27 18:30 luca.skg
-rwx------ 1 luca luca 1036306 dic 27 18:30 luca.skg.old
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Hi,

Could you please execute exactly what I asked "ls -al .*.skg* *.skg" and not "ls -al *.skg"?
This is really important to see if the recovery file is available or not.

Code: Select all
1-Close Skrooge
2-Run "ls -al .*.skg* *.skg"
3-Open Skrooge and open the document from the key
4-Run "ls -al .*.skg* *.skg"
5-Close Skrooge
6-Run "ls -al .*.skg* *.skg"
7-Send me the result of 2, 4 and 6


Thank you.
Regards.


Skrooge, a personal finances manager powered by KDE
Image - PayPal
fluca1978
Registered Member
Posts
81
Karma
0
OS
Step 4:

Code: Select all
$ ls -al .*.skg* *.skg*
-rwx------ 1 luca luca 1067026 gen 20 18:04 luca.skg
-rwx------ 1 luca luca 1063954 gen 20 18:04 luca.skg.old
-rwx------ 1 luca luca 1067008 gen 20 18:06 .luca.skg.wrk


After closing skrooge:

Code: Select all
$ ls -al .*.skg* *.skg*
ls: cannot access .*.skg*: No such file or directory
-rwx------ 1 luca luca 1067026 gen 20 18:04 luca.skg
-rwx------ 1 luca luca 1063954 gen 20 18:04 luca.skg.old


Does it help?
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Hi,

Yes.
The file ".luca.skg.wrk" is the working document. This is this document that causes the message about recovery.
After closing skrooge, this file has been deleted. This means that you should not have the message again, if you restart Skrooge.

Could you confirm?


Skrooge, a personal finances manager powered by KDE
Image - PayPal
fluca1978
Registered Member
Posts
81
Karma
0
OS
I'm resuming this thread because I'm observing the same behavior again, after a few months the program was working right.
Please note that since about 5+ months I'm using only one computer, always the same usb slot and the same usb stick, and therefore I think we can exclude some interoperability issue between different hardware/software.

This is what happens: I launch skrooge, open the document and get the warning that the document has been restored, and this happens every time.

Before I launch skrooge:
Code: Select all
$ ls -al .*.skg* *.skg
ls: cannot access .*.skg*: No such file or directory
-rwx------ 1 luca luca 2713618 gen 18 14:14 luca.skg


Then I launch skrooge (from the terminal, to catch any relevant message) and open the document:

Code: Select all
$ skrooge &
[1] 3220
luca@lferrar3:/media/veracrypt1/CONTABILITA$ ##WARNING: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
##WARNING: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

[1]+  Done                    skrooge
$
luca@lferrar3:/media/veracrypt1/CONTABILITA$ ls -al .*.skg* *.skg
-rwx------ 1 luca luca 2713618 gen 18 14:14 luca.skg
-rwx------ 1 luca luca 2713600 gen 19 08:36 .luca.skg.wrk


and the warning happens. At the end, I quit skrooge:

Code: Select all
$ ls -al .*.skg* *.skg
ls: cannot access .*.skg*: No such file or directory
-rwx------ 1 luca luca 2713618 gen 18 14:14 luca.skg


This is happening every time.
I'm using version 1.9.3 on kubuntu 15.10.
The usb stick is formatted as vfat.
What puzzles me is that it was behaving right since a while, and now it seems something has "corrupted" and cannot be restored.
Is there any check I can run against the sqlite3 database?
User avatar
smankowski
Moderator
Posts
1047
Karma
7
OS
Hi,

Your file seems to be in an encrypted directory (veracrypt).
Do you have the same issue if the file is in your home?


Skrooge, a personal finances manager powered by KDE
Image - PayPal
fluca1978
Registered Member
Posts
81
Karma
0
OS
smankowski wrote:Hi,

Your file seems to be in an encrypted directory (veracrypt).
Do you have the same issue if the file is in your home?


Yes, moving the file to my home directory produces the same result.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]