Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Merge From Database on open/save #9351

Closed
dolfandringa opened this issue Apr 23, 2023 · 7 comments
Closed

Automatic Merge From Database on open/save #9351

dolfandringa opened this issue Apr 23, 2023 · 7 comments

Comments

@dolfandringa
Copy link

Summary

Allow automatic merging of a database when opening/saving it.

Examples

The Merge From Database feature works well, but having to do it manually everytime is a nuisance. A setting where that can be done automatically on every open/save of the database, and the ability to save the password for that database in the local database, would be great. Combined with OS level remote/cloud connectivity it would make the syncing of databases more robust.

Context

I have setup my database in a secure remote location that I can sync with my laptop. But working from that database directly often leads to sync conflicts between my laptop and desktop since the FS sync tool (webdav, sftp, whatever) doesn't know the contents of the database. It just tracks whether the file has been modified. I often am in the situation that I am on the road on my laptop, modify my database, and then when I get home, open the same database on my desktop and modify it there too. Any FS level sync tool will now see a conflict, since it has been modified both on my laptop and on my desktop. The keepass database itself already has history and can sync at the individual key level. That solves this issue 99% of the time (conflict only still possible at the indiviual key level). So what I would like to do, is have a local copy of my database, and a remote copy that is mounted locally (in my case through nautilus). Every time I open my local copy, it should check if the remote file is available, and if it is, sync with that file on save and on open. If the remote file isn't mounted (no internet) just keep using the local copy with a small notification that it couldn't merge and try again next time.
For me this would provide all remote sync functionality I need without needing webdavs/sftp/etc support in keepassxc directly.

@dolfandringa
Copy link
Author

If you have any guidance/ideas about this, I would be willing to see if I can contribute a PR for it.

@droidmonkey
Copy link
Member

droidmonkey commented Apr 23, 2023

You need a better file sync service. Use a cloud file service, nextcloud, or syncthing.

KeePass databases are single file single location jobs. As soon as you deviate from that model it is on you to figure out the sync strategy for the file. We are not going to incorporate exotic sync strategies into the program. There is already a PR for remote database access that is being reviewed for inclusion.

@droidmonkey droidmonkey closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2023
@dolfandringa
Copy link
Author

No cloud service understands the content of the keepass files.

@dolfandringa
Copy link
Author

I have used all of those (currently usinng both synology drive and a webdav service), and none of them provide the "merge database" functionality since none of them know what changed in a file. Whatever the service, none of them can track what changed inside a database. Only that a file was changed at a specific time. But if the files changes in two places independently, you have a merge conflict. With all of them.
On top of that keepass files already provides the required functionality in the file format, and you already implemented it in kepassxc: "merge database". So its not exotic at all, you already have the functionality 95%. The only thing I am suggesting is making a feature to automate clicking this button:
image

@dolfandringa
Copy link
Author

And I am even willing to spend time on it to contribute.

@dolfandringa
Copy link
Author

Also keepass2 and keepass2android also provide this functionality. Keepass2android keeps a locally cached version, that it syncs with the cloud when available, and keepass2 allows you to either open from webdav directly (so always syncs properly if internet is available) which I guess you are considering now too (the faq says you should use an external service)? And it also provides triggers and actions (which are a bit clunky to me but work) which allow you to sync files on open and save, which is my scenario.

@dolfandringa
Copy link
Author

Kinda covered in these 2 as well:
#5024
#2937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants