marvinweber / KPSimpleBackup

KPSimpleBackup - Backup Plugin for KeePass2 (compatible with IOProtocolExt)
GNU General Public License v3.0
130 stars 8 forks source link

Problem with Saving #50

Open sntrypilot opened 1 year ago

sntrypilot commented 1 year ago

I have a master copy of my KeePass database and because it is important I make backups to about 10 different drives (4 local, One Drive, Dropbox, Google Drive, iDrive, etc) using KPSimpleBackup. I noticed today that when I opened up my KeePass database it was not my master database which I keep on Dropbox. Instead it was the last backup of the master database made by KPSimpleBackup. So instead of my master database opening (at "D:\Cloud\Dropbox\ACTIVE KEEPASS[2022-11-25].kdbx") the backup database opened (at "E:\KEEPASS BACKUP/2022-11-25] KeePass_2022.11.25_21.28"). So KeePass is now opening up a backup copy of the file -- which KPSimpleBackup has renamed) on a completely different drive. What should happen is that when I launch KeePass it opens up my master database and not a backup copy on some other drive. Furthermore, the database file that opens up changes -- on different drives. One time it is on the D Drive, Another time it is on GDrive. So I am now left with trying to figure out if the KeePass Database I am now using is the most current with the newest data or if I am using "the correct" backup copy of my KeePass database. This is a nightmare. I have removed KPSimpleBackup because the database file that KeePass opens is now subject to the whim of and renaming by KPSimpleBackup. Thanks alot.

upD8R commented 1 year ago

I'm not the author of this useful plugin but I can't see how this is the plugin's fault. The file to be opened by Keepass is referenced in KeePass.config.xml and the plugin does not change the content of this file but it's actually adapted each time you launch Keepass by Keepass itself. So it is much more likely that the backup file was accidentally double-clicked and next time it is opened by default.

If you are turned on backup of config files you may find out when this happened. Maybe you can avoid this by setting the config file to write protected but I don't know if this works and what side effects this may have.

But maybe I'm totally wrong, let's see what the author thinks.

marvinweber commented 1 year ago

As @upD8R already stated, KeePass usually always opens the last opened / closed database file.

Do you happen to sometimes open your backup KeePass files? I've not have seen the problem you described a single time yet. KPSimpleBackup does not modify the Config file (see @upD8R comment) and also not open the backup files (which are, currently, only copies of the original database file – so KeePass isn't really aware of them).

TerranonGlaz commented 1 year ago

@sntrypilot

At first, in order to avoid opening a backup, perhaps you can change the extension of the backup file, in the KPSimpleBackup settings, Advanced tab. Attached is a screenshot :

kpsimplebackup