bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
3.86k stars 224 forks source link

Deleting files on temporary network dropouts #989

Closed Massimo-B closed 5 months ago

Massimo-B commented 5 months ago
$ unison -version
unison version 2.53.3 (ocaml 4.14.1)

Since long time I'm running unison against a central WebDAV server, using davfs2-1.6.0 FUSE mount on Linux clients (and FolderSync on Android clients). I usually have -fastcheck true and only disable it occasionally. The other configuration is like this:

log = false
perms = 0
dontchmod = true
links = false
fastcheck = no
confirmbigdel = true
ignoreinodenumbers = true
maxthreads = 8

Sometimes the uplink is a weak connection that could have some dropouts.

Usually I only run the -ui text, quickly accepting all proposals via f and then finally apply via g. Now on a network dropout I noticed that a longer list of files was going to be deleted locally because detected as missing on the remote side by mistake. Fortunately I knew that's wrong and re-run on a stable link. Now all these wrong files have been skipped as existing on both sides, as expected.

If I would have accepted that wrong change, it would have been deployed to the central server the next run and then deployed to all other clients. This is so dangerous and I can't trust the automatic proposals anymore. What can I do? Is this a bug of the davfs2 FUSE mount? Even when the link is down, it might confirm inodes from it's local cache if already filled, but it somehow detected the link dropout and reported as non-existent. Any comments?

Moreover the usage of davfs2 FUSE mount is not optimal, as unison usually walks through several GiB of files. But with the webdavfs2 cache set as huge as the whole server space and using -fastcheck true it's working well and quite fast. The FUSE mount also allows to work with grep, dirdiff, vimdiff etc. But usually working on the WebDAV directly is slow, which is the main reason I'm mirroring the server space to my local filesystem via unison. So actually unison is the only one working on the davfs2 mount. However I would feel better if unison would natively support some webdav:// protocol. Are there any plans to support more protocols?

gdt commented 5 months ago

Please use the mailinglist for questions and help request. The tracker is only for bug reports. I read your message as a series of questions. How to deal with DAV filesystems is a good question, but should be directed at unison-users@.

See