keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.34k stars 1.47k forks source link

merging identical files gives conflicts? #9232

Open bgoglin opened 1 year ago

bgoglin commented 1 year ago

Hello

I am getting conflicts when merging between my main database into its backup. I couldn't find out why, thus I overwrote the backup with the main database (after verifying conflicting entries were OK). But now the files are strictly identical but I still get conflicts:

$ diff KeepassXC.kdbx /mnt/tiko/Backup/KeepassXC/KeepassXC.kdbx
<no difference>
$ keepassxc-cli merge -s KeepassXC.kdbx /mnt/tiko/Backup/KeepassXC/KeepassXC.kdbx
Enter password to unlock KeepassXC.kdbx: 
Entry of accounts.autodesk.com[218fd2006120447f8d75e745bfd36ddc] contains conflicting changes - conflict resolution may lose data!
[...]
Entry of lwn.net[a3b1245c153d445ab31d7f13b1ab7ff5] contains conflicting changes - conflict resolution may lose data!
Database was not modified by merge operation.

And merging in the other direction gives the exact same conflicts.

I don't understand how that's possible. I would think the merge would only compare the contents of the database files. But it looks like it uses something else? Is there a history or some metadata somewhere else? Where can it find different info for these identical databases, causing these conflicts?

Thanks

bgoglin commented 1 year ago

During shower, I thought this could be related to different version of keepassxc. The main DB was last modified on a machine with keepassxc 2.6.2+dfsg.1-1 (from Debian) but the conflicts occurs on a machine with 2.7.4+dfsg.1-2 (both machines have their local DB and I backup those to the same backup DB on NFS). I upgraded the 1st machine to the same 2.7.4+dfsg.1-2, opened the database, modified it, saved it (assuming this would "upgrade" the entire DB to something better for 2.7.4). But I still et conflicts. And actually I have conflicts only on the second machine, not on the first one.

droidmonkey commented 1 year ago

This is #3340