NextCloud sync problem and data loss

Operating system

macOS

Joplin version

3.1.24

Sync target

Nextcloud

Editor

Markdown Editor

What issue do you have?

Hi,

I have a lot of problems using sync with NextCloud. I first set the "Nextcloud : URL WebDAV" to "https://cloud.mydomain.example/remote.php/dav/files/user", assuming that Joplin would create a Joplin folder inside that location. Which it did.

But few days later, I found dozens of .md files (the ones with the hexadecimal name) in my Nextcloud user dir (not in Joplin dir, but beside it).

So I concluded that my URL was wrong. So I changed it and set it to "https://cloud.mydomain.example/remote.php/dav/files/user/Joplin"

This worked for a few days. But two days ago, my computer crashed (due to a non-related problem). And when Joplin started back, it seemed to have lost all my notes except someone of them.

I had more than 3000 notes (imported from my previous database), and was left with only 700 of them (and the most recent ones had disappeared). My backup plugin was set to keep only 1 backup, so I lost everything older than two days ago.

My NextCloud still contained .md files with the lost data, but I can't see them from Joplin.

  1. How to re-import lost .md files ?
  2. What is the "correct" URL to set in "Nextcloud : URL WebDAV" ?
  3. Why does Joplin messes up with the files by creating .md files beside to Joplin dir ?

As a supplementary example of what is strange to me:

  • URL WebDAV is set to : https://cloud.aezi.fr/remote.php/dav/files/laurent
  • Joplin folder inside that URL contains all *hexa_id*.md files and remote data (info.json, locks, .lock, etc)
  • I can see these *hexa_id*.md files inside the /path/to/nextcloud/data/user/files/Joplin
    • BUT: *hexa_id*.md also appeared into the base location (/path/to/nextcloud/data/user/files)

I guess that I can use NextCloud to retrieve older versions of lost files since it stores regular backup of each file.

Which are the files that store the database ? If I restore them, can I get back my data ? What else should I restore ?