Menu

Synchronization updates the backup database

Alessandro
2015-07-12
2015-07-13
  • Alessandro

    Alessandro - 2015-07-12

    I made a sync by trigger from the examples
    http://keepass.info/help/kb/trigger_examples.html#dbsync
    I added another event "Opened database file" to catch the changes made on other PC.

    The problem is every time a synchronization occurs (when I open/unlock the DB), the Dropbox copy is updated (or maybe just touches). This makes Dropbox to start the sync.

    Is it possible to prevent the changes in the Dropbox copy if the databases are in sync?

     
  • wellread1

    wellread1 - 2015-07-12

    KeePass synchronization updates and saves both database copies during synchronization. This ensures that the entries in both saved database copies, as well as the in-memory version of the source database, are identical immediately following synchronization. Any save in a DropBox managed folder initiates a DropBox synchronization.

    1. Your options on the KeePass side are:

      • Make sure that neither database involved in the KeePass synchronization is located in a DropBox folder.
      • Don't synchronize automatically (e.g. at database open). Instead create a button using triggers to initiate synchronization on demand (adapt the trigger you have already built).
    2. Your options on the DropBox side are:

      • Pause DropBox syncing. Right click on the DropBox icon in the system tray and click on the gear icon in the upper left corner of the DropBox popup dialog, then select 'Pause syncing'
      • Exit DropBox. Right click on the DropBox icon in the system tray and click on the gear icon in the upper left corner of the DropBox popup dialog, then select 'Exit DropBox'.
      • Disable syncing for one folder in DropBox. Right click on the DropBox icon in the system tray and click on the gear icon in the upper left corner of the DropBox popup dialog, then select 'Preferences>Account>Selective Sync...' and deselect the DropBox folder containing the KeePass database.
     

    Last edit: wellread1 2015-07-12
  • wellread1

    wellread1 - 2015-07-12

    KeePass does not check whether file contents are the same before synchronizing two databases. It just synchronizes them when asked. Adding a test to check whether the database contents are identical may require an entry by entry comparison or a database format change to store a hash of the contents. Either option is extra code just to avoid a save. A comparison of two encrypted copies of the same database won't necessarily reveal whether they have identical contents because they may be encrypted using different initialization vectors.

     

    Last edit: wellread1 2015-07-12
    • Alessandro

      Alessandro - 2015-07-13

      Understood. Thanks for the explanation. I thought it was a two-step process: first you compare, then if there are differences you synchronize.

       

Log in to post a comment.

MongoDB Logo MongoDB