vrtmrz / obsidian-livesync

MIT License
5.14k stars 167 forks source link

Overwrite Remote #461

Open andymarden opened 4 months ago

andymarden commented 4 months 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 4 months 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 4 months 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 4 months 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.

slimjet4u commented 4 months ago

Now imagine what to do if you have 3 devices that you have already setup to sync.

The half ass documentation exists as github issues here lol

vrtmrz commented 3 months ago

I sincerely apologise for the delay in my response! I understand that this documentation has been somewhat outdated. Nevertheless, this still provides a basic behaviour of how the LiveSync handles files. It may be useful for understanding what the database is for, and, et cetra we have been wonders.

I will rewrite or refine this to reflect current new things!