Answer the question
In order to leave comments, you need to log in
How to sync webDAV via rsync?
I'm trying to synchronize the local folder and the [email protected] I bought a business account in order to have regular access to webdav, mounted it
https://webdav.cloud.mail.ru /cloud davfs user,rw 0 0
rsync -r --size-only /hdd/test/ /cloud/test/ --temp-dir=/tmp --no-owner --no-group
[email protected]:/hdd/test# rsync -r --size-only /hdd/test/ /cloud/test/ --temp-dir=/tmp --no-owner --no-group
rsync: open "/cloud/test/IMGP9973.JPG": Invalid argument (22)
rsync: copy "/tmp/IMGP9973.JPG.p7aPQl" -> "IMGP9973.JPG": Invalid argument (22)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
Answer the question
In order to leave comments, you need to log in
In my case, it was necessary to specify use_locks 0 in the davfs2 configuration. I did not understand if this is a feature of mail.ru or rsync.
because rsync makes a temporary file during transfer in the form /tmp/IMGP9973.JPG.p7aPQl which the remote host doesn't understand
try
--inplace In this case, rsync will not create a new file when copying and then replace the old one with it, but will immediately start overwriting the old file. Such an algorithm will not be able to preserve the integrity of the file in the event of a connection failure between computers, except when used in conjunction with the --backup option.
This option is useful when copying files on a single computer, or when copying large files with block-level changes or data appended to the end of the file.
The option includes --partial (breaking the connection does not delete the file), but conflicts with --partial-dir and --delay-updates
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question