Unable to clone locally, getting error "Failed to copy: failed to finish download: MAC verification failed"

What is the problem you are having with rclone?

I'm trying to sync all my data from my Mega Cloud down to my local server.

The clone command was working fine for several hours and managed to download quite a lot, about 2/3 of all my data, so not quite everything.

It then ran into the error that I am trying to solve: Failed to copy: failed to finish download: MAC verification failed

I have found the same problem on an older topic which has since been closed without any resolution:

Run the command 'rclone version' and share the full output of the command.

$ rclone version
rclone v1.63.1
- os/version: debian 11.7 (64 bit)
- os/kernel: 5.13.19-2-pve (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.6
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Mega

The command you were trying to run (eg rclone copy /tmp remote:tmp)

This is the command that I'm using with the latest output of re-running it:

$ rclone -P --progress-terminal-title copy remote: cloud-copy/
2023-08-07 10:44:18 ERROR : Photos & Videos/Ireland/IMG_5724.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:22 ERROR : Photos & Videos/Ireland/IMG_5719.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:23 ERROR : Photos & Videos/Ireland/IMG_5716.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:24 ERROR : media/Photos/Ireland/IMG_5716.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:24 ERROR : media/Photos/Ireland/IMG_5719.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:24 ERROR : media/Photos/Ireland/IMG_5724.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:29 ERROR : Attempt 1/3 failed with 6 errors and: failed to finish download: MAC verification failed
2023-08-07 10:44:32 ERROR : Photos & Videos/Ireland/IMG_5724.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:35 ERROR : Photos & Videos/Ireland/IMG_5719.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:36 ERROR : Photos & Videos/Ireland/IMG_5716.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:37 ERROR : media/Photos/Ireland/IMG_5716.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:37 ERROR : media/Photos/Ireland/IMG_5724.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:38 ERROR : media/Photos/Ireland/IMG_5719.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:43 ERROR : Attempt 2/3 failed with 6 errors and: failed to finish download: MAC verification failed
2023-08-07 10:44:45 ERROR : Photos & Videos/Ireland/IMG_5724.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:50 ERROR : Photos & Videos/Ireland/IMG_5719.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:51 ERROR : Photos & Videos/Ireland/IMG_5716.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:52 ERROR : media/Photos/Ireland/IMG_5716.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:52 ERROR : media/Photos/Ireland/IMG_5724.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:52 ERROR : media/Photos/Ireland/IMG_5719.JPG: Failed to copy: failed to finish download: MAC verification failed
2023-08-07 10:44:57 ERROR : Attempt 3/3 failed with 6 errors and: failed to finish download: MAC verification failed
Transferred:       61.420 MiB / 61.420 MiB, 100%, 1.406 MiB/s, ETA 0s
Errors:                 6 (retrying may help)
Checks:           1468518 / 1468518, 100%
Elapsed time:      1m58.9s
2023/08/07 10:44:57 Failed to copy with 6 errors: last error was: failed to finish download: MAC verification failed

The rclone config contents with secrets removed.

$ cat ~/.config/rclone/rclone.conf
[remote]
type = mega
user = redacted@email.address
pass = redacted_password

A log from the command with the -vv flag

There's too much on screen to add, the debug information is printing for hundreds of thousands of files, I'm logging this in the meantime and will update once it completes with the error.

2023-08-07 10:44:18 ERROR : Photos & Videos/Ireland/IMG_5724.JPG: Failed to copy: failed to finish download: MAC verification failed

Try to download this specific file using mega web interface to verify if it works. If not then it would mean files are corrupted on mega end.

Install megacmd program and run webdav server with it then connect rclone to this webdav.

Hi @kapitainsky, thanks for the quick response, I can confirm that the file exists in mega and I can download it however upon viewing the image it does indeed look like it cannot be viewed in its entirety, so I concur with the assumption that it is corrupted.

Quick question, regarding these corrupted files, is it possible to send these errored files to err output ( e.g. rclone -P --progress-terminal-title copy remote: cloud-copy/ 2>failed_files) and then have the copy continue on without those files?

I am not aware of any way to do it.

Try my point 2 and use megacmd - maybe it will work. This will use mega own software to access mega cloud - and rclone can communicate with it using webdav. It is also usually much faster than rclone direct - as rclone is using go mega implementation which is far from being perfect

Okay thanks for the response, I'm running into issues compiling it and getting it working, will have to reach out to them for assistance: GitHub - meganz/MEGAcmd: Command Line Interactive and Scriptable Application to access MEGA

why to compile?

They have deb packages for Debian 9/10/11 and 12

Hah, to be honest I did not spot this, I went hunting in Github and the source repo did not mention the pre-compiled releases in the releases section!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.