Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Runnings on multiple computers

Frank
2013-10-17
2013-10-22
  • Frank
    Frank
    2013-10-17

    Hello I have keepass on a few computers and I have the db file in directory that is in the dropbox tree on all systems -- at one point the DB got out sync keepass was opened on sys a and sys a, sys a did an db update -- sys b seemed to see this and noted that it merged the changes ... is there a better way to share the db across systems?

     
  • wellread1
    wellread1
    2013-10-17

    You can avoid confusing dialogs and missing data caused by dropbox conflicted copies by implementing the dropbox sync trigger described in the trigger examples.

     
    • Frank
      Frank
      2013-10-20

      Hello -- Thanks for the reply ... Just a point about this -- the name/location for the db noted in step 1 --- is this local to the pc and not in the dropbox tree?

      Item 24, says to now sync with dropbox --- its not clear to me how the location of the (local) db file connects / maps to the copy in the dropbox tree

      Thanks

       
      • wellread1
        wellread1
        2013-10-20

        its not clear to me how the location of the (local) db file connects / maps to the copy in the dropbox tree

        The local database copy (i.e. the database that was left in its original location in step 2) connects to the dropbox tree via KeePass synchronization with the dropbox local database copy (i.e. the database that was created when you copied the original database in step 2, to what will become part the dropbox tree in step 24)

        the name/location for the db noted in step 1 --- is this local to the pc and not in the dropbox tree?

        Step 1 creates a directory (not a database) that will eventually become part of the dropbox tree in Step 24. If you already have a directory in your dropbox tree where you want to copy (not move) your KeePass database to, then you can use it and skip steps 1 & 24.

         
  • Frank
    Frank
    2013-10-20

    Thanks for the reply, so just to clarify, if I already have the db in a dropbox (sub)directory, which is a local file/folder on the pc, I all need to do is set up the triggers and events/actions pointing to that file/folder and not make a copy of the db file?

     
  • wellread1
    wellread1
    2013-10-20

    if I already have the db in a dropbox (sub)directory, which is a local file/folder on the pc, I all need to do is set up the triggers and events/actions pointing to that file/folder and not make a copy of the db file?

    That is not the preferred method. You should have two local copies of your database as described in the example. Your working database will be the local copy of the database that is outside of the dropbox folder. Using the trigger, you will synchronize the working database with the local database that is located inside the dropbox folder. You should never need to edit directly the local database that is inside the dropbox directory. It is only modified using the sync trigger.

     
    Last edit: wellread1 2013-10-20
    • Frank
      Frank
      2013-10-21

      Hello -- Sorry being dense about this -- I get it now. The dropbox location is the "push" target -- which is not the location where the local database is saved. Triggers and action cause the local db to be pushed to the dropbox folder, then dropbox pushed that to the cloud -- and of there are differences, the local client will sync the dropbox copy and the local copy to be the same, (an I guess) write the changes is both places and dropbox will push that change to the cloud.

      Lastly, is there a way to script the triggers/actions/events to they don't have to
      be typed for each computers? If so, where can I find some doc on it -- thanks for your help

       
      • wellread1
        wellread1
        2013-10-21

        You can copy and paste triggers. Use the the Tools button on the Triggers dialog.

         
  • steelej
    steelej
    2013-10-20

    Please see the diagram attached.

    There must be a local copy of the KeePass database on each computer that is sharing the file. Each local KeePass database will synchronise the the DropBox version thus ensuring that the DropBox version contains any local changes. This will also update the local copy with any changes made on other computers.

    There is an unavoidable situation when the DropBox version could be updated on multiple computers - two machines may attempt to update the DropBox version of the database at the same time. DropBox should recognise the conflict but the later copy may overwrite updates made on another computer. In your case you might assume that this will never happen but there is always that possibility. I have seen it happen on my own system (I have three sharing the KeyPass database).

    The result is that if all your computers update a single DropBox version then you could be left with a DropBox conflict where you have two versions available but the newest one contains the updates from one computer and the older one contains updates from the other. Neither of them is fully up to date with both changes and this would need some complex manual merging.

    When using triggers however the next time each database is synchronised any missing update will be detected and corrected. Conflicts will still be detected but can be ignored.

     
  • Paul
    Paul
    2013-10-21

    steelej, I like your picture. With a few mods that will go nicely on the triggers page.
    Would you please change the following - unless you have a better suggestion?
    "KeePass Local" to "KeePass Local DB".
    "KeePass Master" to "KeePass Sync DB"

    cheers, Paul

     
    • steelej
      steelej
      2013-10-21

      Thanks - How does this look?

      I could send you the Visio file if you want the make any other changes or adapt it. Otherwise I am happy to make any further changes or even create some more diagrams for you.

       
      • Paul
        Paul
        2013-10-22

        Lovely, thanks.

        Dominik, would you please add "KeePass Replication-v1.jpg" to the Trigger Examples page?

        cheers, Paul

         
  • Frank
    Frank
    2013-10-21

    Hello ... Thanks again for the help, but what I discovered with this push schema is that if sys a saved the db and ends the client, then sys b start up, it has an "old" local copy of the db -- is there a trigger that can be added to also sync the db on open?

    I poked around and found a sync option and did that manually -- is there a way to automate this?

     
  • Paul
    Paul
    2013-10-21

    You can sync on database open with a trigger, but that will run every time you unlock the database. It doesn't matter when you sync, just personal choice.

    cheers, Paul

     
  • wellread1
    wellread1
    2013-10-21

    In the example, the trigger is activated by saving the database, so in the scenario you described if you save the db on sys b it should automatically update via sync. You could also create sync triggers activated by other events such as open and close per Paul's suggestion.