vrtmrz / obsidian-livesync

MIT License
3.92k stars 132 forks source link

Overwrite Remote #461

Open andymarden opened 2 days ago

andymarden commented 2 days ago

Well that's useful. Since I had multiple devices and no clue as to why they have stopped syncing - they can all connect to the Couchdb instance and all watching is switched on I thought I would try "Overwrite Remote" to rebuild the server from the local copy on one device.

My reward for this? I now have a remote with one object in it called "obsydian_livesync_version". And that's it. Wonderful. And it s is even misspelled.

andymarden commented 2 days ago

A rebuild everything - local and remote db from local files seems to have fixed that. What on earth does the Overwrite Remote actually do? What state must the local DB have been in? How can the plugin not detect this?

vrtmrz commented 2 days ago

Thank you for opening this issue! The note (with the name which has a shameful misspelling) is the database information document. This document has the version information of the LiveSync.

Overwrite Remote will perform:

Therefore, usually, this feature makes the local database and remote database synchronised. If the only information document has been made, possibly the local database has been empty or broken for some reason. Or accidentally replication has been stopped. If only have got stopped, performing synchronisation again would have fixed the issue.

In contrast to that, Rebuild everything does one more step on the first:

Therefore, your response and action were ideal.

How can the plugin not detect this?

This question might be the key. While the synchronisation has been stopped, does any message has been shown? Usually, Self-hosted LiveSync enumerates the files on the storage and the local database when the Obsidian has been launched. And if there were mismatches, some messages would be shown.

If we had left any messages, it could have helped us. The next time it happens, if you could leave a Log and also a Report, it would surely help us to troubleshoot.

andymarden commented 21 hours ago

Thanks and will do. Generally the issue is that it is far from clear what has happened and what some of these actions do.