What is the problem you are having with rclone?
I am trying to sync a Nextcloud remote and a local copy, and some files do not sync properly, and fail with a "corrupted data" message.
Run the command 'rclone version' and share the full output of the command.
$ rclone --version
rclone v1.66.0
- os/version: raspbian 12.5 (64 bit)
- os/kernel: 6.6.20+rpt-rpi-v8 (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.22.1
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Using NextCloud 28.0.4, on a self-hosted server, with NGINX (PHP-FPM) and PHP 8.2.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
viana@nas-viana:~/Downloads $ rclone sync nextcloud:"Music/AC_DC/Blow Up Your Video/06 Nick Of Time.mp3" . -v -v
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
viana@nas-viana:~/Downloads $ rclone config redacted
[nextcloud]
type = webdav
url = https://server/remote.php/dav/files/username
vendor = nextcloud
user = XXX
description = nextcloud
bearer_token = XXX
pass = XXX
### Double check the config for sensitive info before posting publicly
A log from the command that you were trying to run with the -vv
flag
2024/04/12 14:44:46 DEBUG : rclone: Version "v1.66.0" starting with parameters ["rclone" "sync" "nextcloud:Music/AC_DC/Blow Up Your Video/06 Nick Of Time.mp3" "." "-v" "-v"]
2024/04/12 14:44:46 DEBUG : Creating backend with remote "nextcloud:Music/AC_DC/Blow Up Your Video/06 Nick Of Time.mp3"
2024/04/12 14:44:46 DEBUG : Using config file from "/home/viana/.config/rclone/rclone.conf"
2024/04/12 14:44:46 DEBUG : found headers:
2024/04/12 14:44:46 DEBUG : Chunks temporary upload directory: https://server/remote.php/dav/uploads/orestes/
2024/04/12 14:44:46 DEBUG : fs cache: adding new entry for parent of "nextcloud:Music/AC_DC/Blow Up Your Video/06 Nick Of Time.mp3", "nextcloud:Music/AC_DC/Blow Up Your Video"
2024/04/12 14:44:46 DEBUG : Creating backend with remote "."
2024/04/12 14:44:46 DEBUG : fs cache: renaming cache item "." to be canonical "/home/viana/Downloads"
2024/04/12 14:44:46 DEBUG : 06 Nick Of Time.mp3: Need to transfer - File not found at Destination
2024/04/12 14:44:49 DEBUG : 06 Nick Of Time.mp3: sha1 = 061a4ad4d97814247f56794282d2c01578eaa9fe (webdav root 'Music/AC_DC/Blow Up Your Video')
2024/04/12 14:44:49 DEBUG : 06 Nick Of Time.mp3.moqodox9.partial: sha1 = 26de37113b5145cea61506a3afdc1ceb585e405f (Local file system at /home/viana/Downloads)
2024/04/12 14:44:49 ERROR : 06 Nick Of Time.mp3.moqodox9.partial: corrupted on transfer: sha1 hash differ "061a4ad4d97814247f56794282d2c01578eaa9fe" vs "26de37113b5145cea61506a3afdc1ceb585e405f"
2024/04/12 14:44:49 INFO : 06 Nick Of Time.mp3.moqodox9.partial: Removing failed copy
2024/04/12 14:44:49 ERROR : Attempt 1/3 failed with 1 errors and: corrupted on transfer: sha1 hash differ "061a4ad4d97814247f56794282d2c01578eaa9fe" vs "26de37113b5145cea61506a3afdc1ceb585e405f"
2024/04/12 14:44:49 DEBUG : 06 Nick Of Time.mp3: Need to transfer - File not found at Destination
2024/04/12 14:44:51 DEBUG : 06 Nick Of Time.mp3: sha1 = 061a4ad4d97814247f56794282d2c01578eaa9fe (webdav root 'Music/AC_DC/Blow Up Your Video')
2024/04/12 14:44:51 DEBUG : 06 Nick Of Time.mp3.wiqariv5.partial: sha1 = 26de37113b5145cea61506a3afdc1ceb585e405f (Local file system at /home/viana/Downloads)
2024/04/12 14:44:51 ERROR : 06 Nick Of Time.mp3.wiqariv5.partial: corrupted on transfer: sha1 hash differ "061a4ad4d97814247f56794282d2c01578eaa9fe" vs "26de37113b5145cea61506a3afdc1ceb585e405f"
2024/04/12 14:44:51 INFO : 06 Nick Of Time.mp3.wiqariv5.partial: Removing failed copy
2024/04/12 14:44:51 ERROR : Attempt 2/3 failed with 1 errors and: corrupted on transfer: sha1 hash differ "061a4ad4d97814247f56794282d2c01578eaa9fe" vs "26de37113b5145cea61506a3afdc1ceb585e405f"
2024/04/12 14:44:51 DEBUG : 06 Nick Of Time.mp3: Need to transfer - File not found at Destination
2024/04/12 14:44:52 DEBUG : 06 Nick Of Time.mp3: sha1 = 061a4ad4d97814247f56794282d2c01578eaa9fe (webdav root 'Music/AC_DC/Blow Up Your Video')
2024/04/12 14:44:52 DEBUG : 06 Nick Of Time.mp3.wotabix5.partial: sha1 = 26de37113b5145cea61506a3afdc1ceb585e405f (Local file system at /home/viana/Downloads)
2024/04/12 14:44:52 ERROR : 06 Nick Of Time.mp3.wotabix5.partial: corrupted on transfer: sha1 hash differ "061a4ad4d97814247f56794282d2c01578eaa9fe" vs "26de37113b5145cea61506a3afdc1ceb585e405f"
2024/04/12 14:44:52 INFO : 06 Nick Of Time.mp3.wotabix5.partial: Removing failed copy
2024/04/12 14:44:52 ERROR : Attempt 3/3 failed with 1 errors and: corrupted on transfer: sha1 hash differ "061a4ad4d97814247f56794282d2c01578eaa9fe" vs "26de37113b5145cea61506a3afdc1ceb585e405f"
2024/04/12 14:44:52 INFO :
Transferred: 24.748 MiB / 24.748 MiB, 100%, 3.915 MiB/s, ETA 0s
Errors: 1 (retrying may help)
Elapsed time: 6.6s
2024/04/12 14:44:52 DEBUG : 7 go routines active
2024/04/12 14:44:52 Failed to sync: corrupted on transfer: sha1 hash differ "061a4ad4d97814247f56794282d2c01578eaa9fe" vs "26de37113b5145cea61506a3afdc1ceb585e405f"
Initial research
The target folder is in an ext4fs filesystem on a Raspberry Pi 4B, running RaspberryPi OS (64-bit) Bookworm:
Linux nas-viana 6.6.20+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/Linux
I have checked that the problem is the way rclone is reporting the remote hash, here it is the hashsum output for the remote:
viana@nas-viana:~/Downloads $ rclone hashsum sha1 nextcloud:"Music/AC_DC/Blow Up Your Video/06 Nick Of Time.mp3" -v
061a4ad4d97814247f56794282d2c01578eaa9fe 06 Nick Of Time.mp3
If I manually copy the remote file to local with scp -p
:
viana@nas-viana:~/Downloads $ scp -p server:"/Music/AC_DC/Blow Up Your Video/06 Nick Of Time.mp3" .
06 Nick Of Time.mp3 100% 8447KB 2.9MB/s 00:02
And I check the hash of the transferred file it is:
viana@nas-viana:~/Downloads $ rclone hashsum sha1 06\ Nick\ Of\ Time.mp3
26de37113b5145cea61506a3afdc1ceb585e405f 06 Nick Of Time.mp3
If I run sha1sum in a console on the remote host:
server$ sha1sum 06\ Nick\ Of\ Time.mp3
26de37113b5145cea61506a3afdc1ceb585e405f 06 Nick Of Time.mp3
So the sha1sum on the remote console, and the hashsum sha1 on the local scp-copied file are the same,
but the hashsum of the remote file is different.
There is something in the middle that is "changing" the file and thus making the hash calculation differ.
I am not sure if it is Nextcloud (or any other component in the middle) or rclone.