Can you please provide an example when this would be useful? I am not sure why the plugin should sync periodically, especially if you have not made any changes to your database.
The plugin has EnableAutoSync property in KeePass.config.xml file. You can change the value from false to true.
This will start syncing your database as soon as you save it (Ctrl-S or File > Save) - this will make the save process a bit longer but it would help avoid extra steps of doing the sync.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It would be useful if you also use e.g. KeePass2Android and make changes there while KeePass on your desktop is running in the background.
As it is now, I have to manually Sync before using the db if changes have been made by the phone.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
+1 on request for auto sync scheduling.
At minimum, the db should auto sync on both open and save. Typical scenario:
- Make some updates on the phone which gets synced to google drive (K2A)
- Open db on PC, but forget to force a sync
- Make changes and save which also syncs to google drive
-- The changes made on the phone seem to be lost...
TIA!
PS: K2A is good about syncing on open, so this issue doesn't affect any changes made by this plugin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Scenario you mention should not be such a big problem. The Sync algorithm used by KeePass is more a merge than one or the other wins. It is done on a per entry level and is primarily based on modification time (and username / pw uniqueness - so advanced properties might indeed be a bigger problem). But there is always the history to recover such mistakes.
Only if you do modifications to the same entry within a short period of time (below clock skew), it might be that not the latest version of one entry wins.
But c'mon, how often does that really happen with password entries?
Not 100% sure if K2A uses the same algorithm though.
K2A does not always update the local copy, at least if you use the very useful Quick Unlock, afaict.
But I have thought about your wish for an automatic sync on open in the past too, and think it's a useful feature. It is also almost trivial to implement.
So expect me (or drdi) to implement that feature in the not too distant future...
I think I will check for the correct configuration before doing an auto sync and silently fail if it is not found. In contrast, current auto sync on save will ask for a configuration in that case. Which is a bit of a nuisance if you also use other databases that do not need to be synced.
Last edit: Uranium235 2014-11-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks!! I think failing silently should be fine -- I believe the status line displays info when the syncs are successful so user can tell whether or nor the sync happened.
BTW, did have to disable Quick Unlock on K2A so that any changes get synced after the timeout/force close.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can always sync manually with KeePass as well as K2A after Quick Unlock if paranoid ;)
At least the sync method with the plugin is very safe, as is uses the KeePass Synchronize feature that (almost) always guarantees nothing is lost. Worst case you would have to recover from entry history / recycle bin group.
I haven't really tested K2A, but I now suspect it indeed only does up/downloads, not a merge (true sync). But in that case you still have the Google Drive versioning to recover.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just wanted to close the loop on my request. I've verified the changes work beautifully- I can configure files shared with my mobile devices to sync when opened & saved. Thanks again for supporting requests so quickly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any way to schedule this sync to run periodically?
Can you please provide an example when this would be useful? I am not sure why the plugin should sync periodically, especially if you have not made any changes to your database.
The plugin has EnableAutoSync property in KeePass.config.xml file. You can change the value from false to true.
This will start syncing your database as soon as you save it (Ctrl-S or File > Save) - this will make the save process a bit longer but it would help avoid extra steps of doing the sync.
It would be useful if you also use e.g. KeePass2Android and make changes there while KeePass on your desktop is running in the background.
As it is now, I have to manually Sync before using the db if changes have been made by the phone.
+1 on request for auto sync scheduling.
At minimum, the db should auto sync on both open and save. Typical scenario:
- Make some updates on the phone which gets synced to google drive (K2A)
- Open db on PC, but forget to force a sync
- Make changes and save which also syncs to google drive
-- The changes made on the phone seem to be lost...
TIA!
PS: K2A is good about syncing on open, so this issue doesn't affect any changes made by this plugin
The Scenario you mention should not be such a big problem. The Sync algorithm used by KeePass is more a merge than one or the other wins. It is done on a per entry level and is primarily based on modification time (and username / pw uniqueness - so advanced properties might indeed be a bigger problem). But there is always the history to recover such mistakes.
Only if you do modifications to the same entry within a short period of time (below clock skew), it might be that not the latest version of one entry wins.
But c'mon, how often does that really happen with password entries?
Not 100% sure if K2A uses the same algorithm though.
K2A does not always update the local copy, at least if you use the very useful Quick Unlock, afaict.
But I have thought about your wish for an automatic sync on open in the past too, and think it's a useful feature. It is also almost trivial to implement.
So expect me (or drdi) to implement that feature in the not too distant future...
I think I will check for the correct configuration before doing an auto sync and silently fail if it is not found. In contrast, current auto sync on save will ask for a configuration in that case. Which is a bit of a nuisance if you also use other databases that do not need to be synced.
Last edit: Uranium235 2014-11-20
I have implemented the Auto Sync on Open feature in the source repository. I expect it to be released in v2.1 within a few days / a week or so.
Thanks!! I think failing silently should be fine -- I believe the status line displays info when the syncs are successful so user can tell whether or nor the sync happened.
BTW, did have to disable Quick Unlock on K2A so that any changes get synced after the timeout/force close.
You can always sync manually with KeePass as well as K2A after Quick Unlock if paranoid ;)
At least the sync method with the plugin is very safe, as is uses the KeePass Synchronize feature that (almost) always guarantees nothing is lost. Worst case you would have to recover from entry history / recycle bin group.
I haven't really tested K2A, but I now suspect it indeed only does up/downloads, not a merge (true sync). But in that case you still have the Google Drive versioning to recover.
Just wanted to close the loop on my request. I've verified the changes work beautifully- I can configure files shared with my mobile devices to sync when opened & saved. Thanks again for supporting requests so quickly.