Hacker News new | ask | show | jobs
by mehrdadn 2595 days ago
I was using "syncing" and "resolving" synonymously. What I was distinguishing between was keeping the most recent file (which is what happens if you use typical cloud syncing for the whole database file) vs. the most recent entry in a given file (which is what you get when KeePass itself gets a chance to actually examine both versions and figure out conflicts internally).

I can't figure out how the KeePass (or the plugin you use, or whatever it is) was handling your Dropbox syncing; it sounds like it was doing a dumb file-level merge, when in fact it's capable of doing much better than that. I use the Google Sync Plugin which has never failed me, even when I'd modified databases on two clients independently before syncing. It uses the ImportUtil.Synchronize() function which I think is what handles the dirty details. See the Technical Details section here: https://keepass.info/help/v2/sync.html

1 comments

> What I was distinguishing between was keeping the most recent file vs. the most recent entry in a given file

Sure! (sorry, have finally had my morning coffee). I believe that Bitwarden handles it correctly via "live sync" [0]. - albeit it's been a transparent process to me. I've generated logins on my mobile, and logged into them within 30s via the browser extensions on my desktop PC.

> I can't figure out how the KeePass (or the plugin you use, or whatever it is) was handling your Dropbox syncing;it sounds like it was doing a dumb file-level merge

It was, and it was excruciating. However, this is one of the issues I have with Keepass - it may be possible to do better, but the default behaviour is abhorrent.

From the link you gave, it explicitly calls out the issue in "advanced" synchronisation schemes under "Local <-> Master" [1]. If you don't correctly follow the setup steps you can end up with [2] which can (and does) result in data loss. The (as far as I can tell) official (as far as I can tell) forums seem to be happy to pass the buck [3] and say "Oh that's not our problem, that's the sync services problem".

> I use the Google Sync Plugin which has never failed me

I don't doubt that for a minute, but for someone migrating from LastPass/OnePass to Keepass, searching for "How to sync keepass across machines" will _never_ point you to the google sync plugin.

[0] https://blog.bitwarden.com/live-sync-bitwarden-apps-fb7a5456... [1] https://keepass.info/help/kb/trigger_examples.html#dbsync [2] https://sourceforge.net/p/keepass/discussion/329221/thread/2... [3] https://sourceforge.net/p/keepass/discussion/329221/thread/9...

> I believe that Bitwarden handles it correctly via "live sync"

That looks cool!

Re: your other comments though: you're not doing a fair comparison. Try letting Dropbox trash your %AppData%\Bitwarden folder and then let me know how well LiveSync handles syncing! That's what you're doing to KeePass.

> However, this is one of the issues I have with Keepass - it may be possible to do better, but the default behaviour is abhorrent.

This isn't the "default behavior" though. The default behavior is in fact to synchronize everything correctly... if you only give it a chance to do that. But if you insist on letting your Dropbox desktop sync pull the rug out from underneath KeePass and replace the whole database randomly, it's literally impossible for KeePass to know what the old entries were to be able to merge them -- it doesn't have them anymore. It needs an old copy of the database around so it can compare the two, and those instructions tell you to make a second copy so it can do its job. That seems pretty fair to me -- what more can you expect? You didn't even give it a chance to do its job, and instead let someone else just trash the place while it's gone, then blame it for not actively fighting your attempts to do that?

This is why KeePass has plugins like KeeAnywhere [1]. You're supposed to use those instead of syncing your database like a normal file. [2] So KeePass actually gets a chance to do its job... if you only let it!

[1] https://keepass.info/plugins.html#keeanywhere

[2] Well, KeePassX[C] folks will beg to differ and just tell you to keep doing what you were already doing and it'll work Just Fine (TM), and that what you were seeing happening in front of your eyes was supposed to be vanishingly unlikely. It's basically gaslighting as far as I can tell, but somehow they can pretend it doesn't affect them, so I dunno...

Understood re; Dropbox and appdata however that doesn't change the fact that if you search for how to sync Keepass across machines that's what you're told to do! The fact that they don't consider syncing a core part of the password manager and are happy to tell people to take awful workarounds (and not mention that it can be resolved with a plug-in anywhere on the main site) tells me that I don't want to use that project.

Pity we didn't have this discussion 18 months ago, I might not have left keepass

> The fact that they don't consider syncing a core part of the password manager

> and not mention that it can be resolved with a plug-in anywhere on the main site

Again, you're accusing them of something that's false! They very much do see this as core functionality and explicitly tell you how to synchronize right there in the synchronization section [1]:

If one of the files to be synchronized is stored in an online storage (like e.g. Amazon's S3, DigitalBucket, ...), you need an online storage provider plugin (e.g. KeeAnywhere, KeeCloud or KeePassSync).

> and are happy to tell people to take awful workarounds

The only bit I'll give you is that the workaround isn't user-friendly, and that they should probably leave a note mentioning the much-more-user-friendly plugins in the Trigger Examples [2]. But aside from that, if you actually follow their workaround, it should work just fine -- as I understood your problem was that you didn't follow their workaround, then you blamed them for the resulting file conflicts...

[1] https://keepass.info/help/v2/sync.html

[2] https://keepass.info/help/kb/trigger_examples.html#dbsync