Menu

Bi-directional sync

jmpdx
2012-11-28
2012-12-11
  • jmpdx

    jmpdx - 2012-11-28

    I've got this working and uploading to Google Drive (and love it) but it doesn't look like it does a bi-directional sync. It will upload my database to GD if my local copy is newer but it won't download a more up to date copy from GD and perform a sync.
    This means if I want to keep a KeePass DB synchronized between 2 computers they will only overwrite the online copy each time they update, not necessarily keep in sync. Is this correct or am I missing a setting?

     
  • Danyal

    Danyal - 2012-11-29

    You are right - it is not bi-directional - yet.

    I am trying to figure out some of the concerns I have for best solution

    • Should the plugin only download, let the user exit KeePass and open it with the new database?
    • Can the plugin refresh an already opened database with a downloaded one? I think it should first make a backup of the existing one just in case - but, can it make a backup of an opened database?
    • Should the plugin only download when the local database is not yet opened? This seems to be most safest route

    So once I have some of these questions figured out, I will include the download option as well.

    If you have a suggestion, please let me know.

     
  • jmpdx

    jmpdx - 2012-11-29

    Thank you Danyal,

    Even with the unidirectional sync this is far more useful than my prior manual method of synchronizing.

    I have no experience writing KeePass plugins but I would probably suggest something along the lines of your 2nd bullet point if you are able to automatically trigger the native KeePass sync (http://keepass.info/help/v2/sync.html.)

    The built in file sync mechanism updates both the source and destination so that after a sync both database files should be identical. You could then upload the file back to Google Drive if any changes were made. In theory you could then have multiple KP installations performing the same Google Drive sync and essentially all keeping up to date regardless of which makes DB changes.

     
  • Danyal

    Danyal - 2012-12-09

    Thanks for pointing me to that link :)

    Hope you like the new version

     
  • jmpdx

    jmpdx - 2012-12-11

    Indeed, I love it. The only issue hit now is that if auto sync is set to True it appears to create a loop condition as it attempts to sync over and over until I either deny access to Google Drive or kill KP. It works flawlessly when I trigger a manual sync with auto sync off though.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.