Menu

Using Synchronization to Consolidate Divergent Copies - history????

Help
appyface
2016-10-25
2016-12-20
  • appyface

    appyface - 2016-10-25

    Hello,
    Using KeePass 2.34 portable on Win10 Pro.

    Due to (many many) reasons, I have literally hundreds of copies of Keepass databases, they all started from the same original database, but divergent in updates: Database 1 has the most recently updated record A, but Database 2 has the most current field 5 on record A though the last record update date is older, Database 3 has the most current field 9 on record A though the last record update is older still, and so on.

    I know KeePass does not support field level syncrhonization. But if I understood the latest file-to-file Synchronization info correctly, and if I set History count and space in my "current" (to be master) database to some big numbers (999999 on each), I should be able to build up history records in the "current" db by synchronizing it with each of the other databases in turn?

    So I tried a test using copies of my "current" db and an older one with known change in a field. The databases synchronized so that both are identical with respect to the "current" db's record.

    But I didn't get any history records in either database?

    I followed the info provided by wellread1 in post "Multiple computers, one family, one file" [https://sourceforge.net/p/keepass/discussion/329220/thread/c0cd0e78/#7a39] on how to set up and proceed, using my test copies, but no joy. I have no history entries in either database, and my older information is now lost.

    What did I miss or didn't handle correctly?

    Thank you for help.

    Kind regards.

     

    Last edit: appyface 2016-10-25
  • Paul

    Paul - 2016-10-25

    KeePass keeps older records in the History when it performs a sync, so the latest history entry should be the old data. Are you sure you set the history correctly? You can just un-tick limit history entries.

    cheers, Paul

     
  • appyface

    appyface - 2016-12-04

    I'm sorry to take so long to reply, I thought I would get an email when someone replied but I didn't... and am just now getting back to this task.

    I have history turned on in the 'master' copy database and limit is unchecked. I do not have history turned on in the 'throwaway' copy database. After I did a sync I do not have any history records for any entries in the 'master' copy. I can see for certain there are differences in some entries in the two databases.

    Do I have to have history turned on in BOTH copies in order for the master copy to get history records created?

    Thank you for your help and again so sorry for late reply.

     
  • appyface

    appyface - 2016-12-04

    Nevermind, am getting history entries now.

    When I opened this question I was syncing my 'master' copy database (the most recently updated database copy) to my oldest database. Then syncing the master to the second oldest, and so on, moving from oldest to the newest.
    Today I tried syncing going the opposite way and syncing my 'master' copy database with the second newest copy, then the third newest, on down to the oldest database.

    To my mind the order shouldn't make any difference and I must have been doing something else wrong, but I have no explanation as to why it is working now...

    Thank you

     
  • wellread1

    wellread1 - 2016-12-04

    It doesn't matter which order you synchronize a pair of databases, the most recently updated entry in either database becomes the current entry in both databases.

    When synchronizing a series of databases you should select one database and synchronize all databases to it. The final synchronization pair is guaranteed to be fully up-to-date, but other databases are not guaranteed to be up-to-date. To bring all databases up-to-date, each of the databases except the final pair must be synchronized again with one of the two databases that were in the final synchronization pair.

    The history depth and other history settings are database settings, not entries. Synchronization of database settings are governed by different rules. When database settings are different between a synchronized pair it is important which of the synchronized databases is the active database . Database settings are inherited from (overwritten by) the active database e.g. If the active database has a database history depth setting of 0 entries while the target database has a history depth setting of 10 entries, the result of the synchronization will be a database pair where neither database contains history entries and the the history depth setting of both databases is 0.

     
  • appyface

    appyface - 2016-12-08

    Yes I used my most recent database copy as "master" and sync'd all the others to it.

    I found out what happened when I went from oldest to newest. I have over 30 folders and dozens of keepass entries inside each one, and I didn't notice the sync to the oldest database created new folders and keepass records from the old database. This is why there was no history created in my most current keepass records.

    I sync'd all the databases to my "master" and ended up with three copies of every original folder and the entries inside them, some or all folders and entries received history records.

    Going from oldest to newest, first time sync the "old" folders were created in my current "master" instead of matching up with the folders in the "master". As I continued it was these "old" folders that received the sync and had history records created, while the current "master" folders remained untouched.

    At some point I reached a database that created another set of "old" folders instead of continuing to sync with the "old" folders. I continued on and this 2nd set of "old" folders received the updates and created history records.

    At some point I reached a database that switched to syncing with my "master" database's most current set of folders and created the history records.

    I don't know why the older databases created new folder sets in the "master" rather than sync with their counterparts. Maybe some change in database version or format over time? They are all keepass 2.x databases, but the oldest databases are from the earliest days of 2.x.

     
  • wellread1

    wellread1 - 2016-12-08

    I sync'd all the databases to my "master" and ended up with three copies of every original folder and the entries inside them, some or all folders and entries received history records.

    Entries and Groups in different databases are considered the same entry only if their UUID is the same. When KeePass synchronizes a database pair, it synchronizes entries that have the same UUID making the most recently edited version of the entry the current entry in both databases. Entries that have different UUIDs are copied to each database. Subsequent synchronization of the database pair will not create additional copies of the entries because each database contains all of the entry UUIDs from each database.

    The other behaviors that you describe are most likely manifestations of the above behavior.

    Entries containing the same user data that are actually different entries are created when a user copies or duplicates an entry; imports entries into a new database using an option the creates new entry IDs (UUIDs); or creates an entry in one database that is already in another database.

    You can eliminate entries that contain certain identical user data by selecting Tools>Database Tools>Delete Duplicate Entries from the KeePass menu.

    Be sure to backup your current database before making major changes.

     
  • appyface

    appyface - 2016-12-10

    Yes I know how it works. And yes I have full backups of all files before doing anything, would be foolish not to, in case some error happens. Precious data!

    All of these old databases are just "save as" copies of the same database over and over across time. I can't explain what would change the UUIDs, just that they apparently did, or their structure or location did. All I can say is, with respect to my OP, I didn't see history records created because the syncd entries were landing into different folders, and I didn't spot that.

    Now that I have one database with everything somewhere inside it, be it in one folder or another, I can start part 2, cleaning up within the database.

    Wish there was a tool for that :-)

     

    Last edit: appyface 2016-12-10
  • wellread1

    wellread1 - 2016-12-10

    I can't explain what would change the UUIDs, just that they apparently did, or their structure [?] or location [in a database] did.

    Entry UUIDs never change in KeePass. However when the user performs an operation that creates a new entry based on an old entry, the newly created entry is assigned a new UUID.

    The entry UUID is the only determinant affecting whether KeePass considers entries to be the same entry or a different entry. Entry structure and location do not affect whether KeePass considers two entries to be the same entry.

    Now that I have one database with everything somewhere inside it, be it in one folder or another, I can start part 2, cleaning up within the database.

    Wish there was a tool for that :-)

    As I mentioned before you can eliminate duplicate entries by selecting Tools>Database Tools>Delete Duplicate Entries from the KeePass menu.

    Entries can be moved between groups using drag and drop.

     

    Last edit: wellread1 2016-12-10
  • appyface

    appyface - 2016-12-17

    My issue is not duplicates, nor moving entries between groups. (thanks anyway)

    I want to clean up multiple records of what I consider duplicates but Keepass did not due to the UUID differences. I want to pick one record that I will keep, and add another record into it strictly as a history record entry. That's what I meant by "wish I had a tool for that". I don't see any way to do this.

     
  • wellread1

    wellread1 - 2016-12-17

    If you have entries that you don't plan to actively use, but wish to keep the obsolete data for reference, place the obsolete entries into an 'Archive' group and edit the group properties of the archive group to disable auto-type and optionally, search. You can periodally review the modified date of the archived entries and delete those that are no longer useful.

    Alternatively, to reduce space in your working database, you can export the obsolete entries into a dedicated archive database.

    You can also expire obsolete entries.

     

    Last edit: wellread1 2016-12-17
  • Paul

    Paul - 2016-12-18

    You can export the database as XML and then edit the data to move the entries to the appropriate history section. Not easy but it will work.

    cheers, Paul

     
  • appyface

    appyface - 2016-12-20

    Thank you Paul. I recall going the XML route long ago to update specific fields in records but I never found a tool that worked well for the task, always was some problem.

    I'm almost done with my cleanup now, and plan to keep them sync'd more often!

    Thanks for the help.

     

Log in to post a comment.

MongoDB Logo MongoDB