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

Database Sync #4555

Closed
KitchM opened this issue Apr 6, 2020 · 15 comments
Closed

Database Sync #4555

KitchM opened this issue Apr 6, 2020 · 15 comments

Comments

@KitchM
Copy link

KitchM commented Apr 6, 2020

Is there a way to synchronize two or more keepassxc databases?

@droidmonkey
Copy link
Member

At this time you need to merge database A into database B then merge database B into database A. Two operations. There is an issue to fix this already: #90

@KitchM
Copy link
Author

KitchM commented Apr 7, 2020

How is a merge done? If I use cat, then I wonder about encryption and the password.

@droidmonkey
Copy link
Member

The merge strategy is to compare all elements by UUID, last changed wins, old version of entry is stored in its history.

@KitchM
Copy link
Author

KitchM commented Apr 7, 2020

What are the exact methods for doing that? What application is used? Details please.

@droidmonkey
Copy link
Member

It is done within KeePassXC. If you want more details you will have to read the code: https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Merger.cpp

@KitchM
Copy link
Author

KitchM commented Apr 7, 2020

So you mean Database>Merge from KeePassXC database. Am I assuming correctly that one is open and the other is selected from the above menu item? Is it also correct that one would then close the program and open it with the other database and do the same thing with the first one?

I would assume that the first step would work by itself if the resulting database was then simply copied over the second one. Correct?

@droidmonkey
Copy link
Member

droidmonkey commented Apr 7, 2020

Sorry misunderstood your last question. Here is the sequence:

  1. Open KeePassXC and unlock Database A
  2. Go to Database > Merge from database...
  3. Choose Database B
  4. Save resulting Database A
  5. Open Database B and unlock it
  6. Go to Database > Merge from database...
  7. Choose Database A
  8. Save resulting Database B
  9. Now A and B are synced with each other

I suppose you could copy A over B after step 4, worth a test.

@KitchM
Copy link
Author

KitchM commented Apr 7, 2020

That's exactly what I was looking for. That also explains that a merge cannot occur without the passwords of both databases. (Can't recover lost password database that way or crack into one either.)

I will be able to merge two now and that helps a lot. Thanks.

@droidmonkey
Copy link
Member

Yah there is absolutely no way to crack a database with a good master password.

@KitchM
Copy link
Author

KitchM commented Apr 10, 2020

I believe you meant "with or without a good master password".

Also, is there any indication of anything happening between steps 3 and 4 above? Nothing happened for me.

@droidmonkey
Copy link
Member

No we don't have a merge results prompt yet, it's on the list.

I did mean what i said. If you have a crappy password it can be cracked, just not that easily.

@KitchM
Copy link
Author

KitchM commented Apr 10, 2020

So then, what is the way to crack it if it has a bad password?

@droidmonkey
Copy link
Member

Dictionary attacks

@AzureRaptor
Copy link

@droidmonkey Forgive me for raising an old issue, but this seemed strongly related as opposed to opening something new.

If one uses the keepassxc-cli program to merge, do both databases need to be closed in all instances of the KeepassXC gui (or any other program that reads them, I assume)?

Also, as a sidenote, I am confused about what the --no-password-from argument does. I know you can't open a database w/o the passphrase and/or key. Does this option strip the password out of the "from" database, and leave it blank, or something else I'm not getting?

Thank you kindly in advance.

@droidmonkey
Copy link
Member

We don't keep file locks so you can leave them open in the GUI, they should auto reload. The no password flag means the database has no password and to not request it to be entered.

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

No branches or pull requests

3 participants