Posted on

I use OneDrive to sync my KeePass database sync to different computers. I usually have the current setup:

  • The original copy of the database file in my OneDrive (monitored/synced) folder.
  • A local copy of the database file on my local disk, which is not synced by OneDrive.

My KeePass application uses the local copy of the database file as it’s working copy. This means that I need to sync the local copy with the copy in the OneDrive monitored folder. This is accomplished using Triggers (see also my previous post).

Trigger

  1. Open up ToolsTriggers.
  2. Check Enable trigger system.
  3. Press the Add... button on the right hand side.
  4. In the Name field, enter a fitting name, such as Sync DB 1.
  5. Ensure to check Enabled and Initially on.

Event

  1. Change to Events tab
  2. Press the Add... button on the right hand side.
  3. Select the event Saved database file.
  4. Set File/URL - Comparision to Equals
  5. Set File/URL - Comparision to the filepath to the local copy, e.g. C:\Local\Path\Database.kdbx
  6. Press OK.

Actions

  1. Change to Actions tab
  2. Press the Add... button on the right hand side.
  3. Select the action Change trigger to on/off state
  4. Leave Trigger name empty
  5. Set New state to Off
  6. Press OK.
  7. Press the Add... button on the right hand side.
  8. Select the action Synchronize active database with a file/URL
  9. Set File/URL to the filepath to the synced copy, e.g. C:\OneDrive\Path\Database.kdbx
  10. Leave I/O Connection - User Name empty
  11. Leave I/O Connection - Password empty
  12. Press OK.
  13. Press the Add... button on the right hand side.
  14. Select the action Change trigger to on/off state
  15. Leave Trigger name empty
  16. Set New state to On
  17. Press OK.
  18. Press Finish.

Final

  1. Repeat steps 3 – 29 above for other databases you wish to open.
  2. Press OK.
  3. Upon saving of the databases specified in step 10, the database should automatically synchronise.
comments powered by Disqus