Combine databases?

Help
tonheim
2013-04-28
2013-05-01
  • tonheim
    tonheim
    2013-04-28

    I run KeePass 2.22 on three different computers. But my synchronization did not work, and I did not notice for a long time. So now I have three different databases. All of them with new content I need. But also with old content I do not need duplicated.

    So what do I do?

    I now have all the database files on one computer, and it would been great if KeePass would been able to combine this three files, into one. One with all then new content from the three files, and at the same time whit out duplications of everything else.
    Is this possible?

    Hope someone can help me!

    Greetings from Norway!

    -T-

     
    Last edit: tonheim 2013-04-28
  • wellread1
    wellread1
    2013-04-28

    First determine why synchronization did not work.

    Once you have fixed that problem you can select one database and resynchronize with the other databases. To be safe, use copies of the databases because all databases are modified during synchronization. Once you are satisfied that the synchronized database is correct, delete all other copies of the database and redistribute the new fully synchronized database.

    When you synchronize a database pair expect the following behavior:

    1. Database entries that are common to both databases (i.e. that have entries with matching UUIDs (Universally unique identifier)) will be merged based on the time stamps of the respective entries. (i.e. The most recent entry becomes the active entry & the older entry ends up in the merged entry's history).

    2. A database entry that never had a entry with a matching UUID in the other database, will be included in the merged database (e.g. if "the same" google mail account entry exists in each database, but they don't have matching UUIDs because they were created separately, the merged database will contain two google mail account entries that must be reconciled manually.)

    3. A database entry that was originally in both databases but that was subsequently deleted from one database may be deleted in the merged database (based on whether the deletion date or subsequent editing of an entry with a matching UUID is more recent). If you need to restore deleted entries you will need to copy them from one of the original databases to the synchronized database. If you need to restore a lot of deleted entries an import/export operation may be more efficient.

    4. If you rearranged the entries into different groups in the respective databases, the entries may not end up where you expected them, but they will be in the merged database. Search for them and manually rearrange them.

    To see entry UUIDs Select View>Configure Columns...>Check "UUID"

     
    Last edit: wellread1 2013-04-29
    • tonheim
      tonheim
      2013-04-30

      The way I was synchronizing was hawing a portable version of KeePass stored in Mesh or what now is SkyDrive, together with the database file. But it ended ut not working for a wild. So I do not this this is the same kind of synchronization you are talking about??

      So how do I fix this? Do I still do like you write? resynchronize? how do I do that?

      -Runar-

       
  • wellread1
    wellread1
    2013-04-30

    I run KeePass 2.22 on three different computers. But my synchronization did not work, and I did not notice for a long time. So now I have three different databases.

    The way I was synchronizing was hawing a portable version of KeePass stored in Mesh or what now is SkyDrive, together with the database file.

    Did you create the three Databases, or did SkyDrive create two additional copies of database? I believe SkyDrive copies are likely to have the computer name appended to the database name.

     
    Last edit: wellread1 2013-04-30
    • tonheim
      tonheim
      2013-04-30

      No, it like a file copy. I had one copy of one a computer in a local folder, this local folder was synchronized over skydrive to two other computers but then the connection broke, probably me messing it up. I kept on working with the files, like them where local single files, not connected in any way. So now it is three separate files, that had the same content in the beginning, but had different content added on different computers.

       
      Last edit: tonheim 2013-04-30
  • wellread1
    wellread1
    2013-04-30

    If you just want to merge the database files then:

    1. Make copies of the three databases
    2. Open the 1st database in KeePass 2.x.
    3. Select File>Synchronize>Synchronize with file...; Browse to the 2nd database and open it.
    4. The 2nd database will be synchronized (merged) with the open (1st) database.
    5. Repeat steps 3 & 4 with the 3rd database.
    6. Save the open (1st database).

    My first post describes what to expect with individual entries in the final merged database. Additionally, the 1st and the 3rd database will be identical and contain the cumulative result of merging all three databases. The 2nd database will be the merge result of the 1st & 2nd database only. You can either synchronize the 2nd database with the 3rd or discard it.

     
    • tonheim
      tonheim
      2013-04-30

      I did it, and I think it worked! Thank you!!

      Is there any logs?? So I can see the change that the sync did?
      That would confirm it easier for me.

      And something strange happened... The old databases I took an copy of all ow them was about 230-255KB in size. The copies I made now are all just 147 KB, I guess it is because them are in sync... :-) But why are they so much smaller??

       
  • Paul
    Paul
    2013-05-01

    KeePass does not keep a log of changes. What you could do is export the data (only group, title and modified date) as HTML and see which ones have been modified by your sync.

    KeePass compresses the files so this may be the reason for the smaller size. To check the number of entries, put the cursor in the search box and press Enter. The total number of entries will be shown in the bottom left corner.

    cheers, Paul