obsidian-livesync icon indicating copy to clipboard operation
obsidian-livesync copied to clipboard

Overwrite Remote

Open andymarden opened this issue 1 year ago • 5 comments

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 avatar Jul 01 '24 06:07 andymarden

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?

andymarden avatar Jul 01 '24 06:07 andymarden

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:

  • Delete the remote database
  • Initialize the remote database (In this step, the document will be made).
  • Replicate the local database to the remote database.

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:

  • Delete the local database and initialise that by files on local storage.
  • Delete the remote database
  • Initialize the remote database (In this step, the document will be made).
  • Replicate the local database to the remote database.

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.

vrtmrz avatar Jul 01 '24 07:07 vrtmrz

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

andymarden avatar Jul 02 '24 17:07 andymarden

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

slimjet4u avatar Jul 09 '24 04:07 slimjet4u

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!

vrtmrz avatar Aug 05 '24 02:08 vrtmrz