Corrupted on transfer

What is the problem you are having with rclone?

I get this error in the log, basically the file with the error is the logfile the rclone is writing in that moment, I have tried to exclude the folder where the file is but I still get the error

I have tried
--exclude "/mnt/user/Storage/CCTV/rclonelog/tmp/*.txt"
--exclude "/mnt/user/Storage/CCTV/rclonelog/tmp/**"

this are the variables defined in the script
MONITORED_PATH="/mnt/user/Storage/CCTV"
DESTINATION_PATH="/Backup/CCTV"
SYNC_OPTION="--update"
RCLONE_LOG_PATH="/mnt/user/Storage/CCTV/rclonelog/"
RCLONE_LOG_TEMP="/mnt/user/Storage/CCTV/rclonelog/tmp/"
RCLONE_LOG="/mnt/user/Storage/CCTV/rclonelog/tmp/rclonelog_$(date +%Y-%m-%d_%H-%M-%S).txt"

Apparently the only thing that works is if I exclude the txt extension but I need to backup that extension in other paths so I cant exclude the extension only.

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

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

Onedrive

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

rclone sync "$MONITORED_PATH" onedriveg:"$DESTINATION_PATH" --update --exclude "/mnt/user/Storage/CCTV/rclonelog/tmp/*.txt" --log-file="$RCLONE_LOG" --log-level INFO

A log from the command with the -vv flag

2023/04/11 17:33:08 INFO  : AzureArq.drawio: Copied (new)
2023/04/11 17:33:09 ERROR : rclonelog/tmp/rclonelog_2023-04-11_17-32-51.txt: corrupted on transfer: quickxor hash differ "6fd0db3e03f8a9bc353e5f627137907538a946bc" vs "0000000000000000000000000000000000000000"
2023/04/11 17:33:09 INFO  : rclonelog/tmp/rclonelog_2023-04-11_17-32-51.txt: Removing failed copy
2023/04/11 17:33:09 INFO  : rclonelog/rclonelog_2023-04-11_17-26-32.txt: Copied (new)
2023/04/11 17:33:09 ERROR : OneDrive root 'Backup/CCTV': not deleting files as there were IO errors
2023/04/11 17:33:09 ERROR : OneDrive root 'Backup/CCTV': not deleting directories as there were IO errors
2023/04/11 17:33:09 ERROR : Attempt 1/3 failed with 1 errors and: corrupted on transfer: quickxor hash differ "6fd0db3e03f8a9bc353e5f627137907538a946bc" vs "0000000000000000000000000000000000000000"
2023/04/11 17:33:10 INFO  : rclonelog/tmp/rclonelog_2023-04-11_17-32-51.txt: Copied (new)
2023/04/11 17:33:11 INFO  : rclonelog/tmp/rclonelog_2023-04-11_17-26-32.txt: Deleted
2023/04/11 17:33:11 ERROR : Attempt 2/3 succeeded

Check out:

Hi l0rdraiden,

I guess you can work around the log file being updated with a very simple exclude rule something like this:

--exclude "rclonelog_*.txt"

or with a more advanced approach like this:

RCLONE_LOG_TEMP="/mnt/user/Storage/CCTV/rclonelog/temp/"
RCLONE_LOG_FILE="rclonelog_$(date +%Y-%m-%d_%H-%M-%S).txt"
RCLONE_LOG="$RCLONE_LOG_TEMP$RCLONE_LOG_FILE"
...
rclone sync "$MONITORED_PATH" ... --exclude "$RCLONE_LOG_FILE"

Note: The root of the exclude path is the starting folder of your source/destination, so --exclude "/rclonelog/tmp/*.txt" and --exclude "tmp/rclonelog_????-??-??_??-??-??.txt" should also work.

1 Like

Thanks a lot, it worked with the advanced approach, If I tell the exact file:

RCLONE_LOG_TEMP="/mnt/user/Storage/CCTV/rclonelog/temp/"
RCLONE_LOG_FILE="rclonelog_$(date +%Y-%m-%d_%H-%M-%S).txt"
RCLONE_LOG="$RCLONE_LOG_TEMP$RCLONE_LOG_FILE"
...
rclone sync "$MONITORED_PATH" ... --exclude "$RCLONE_LOG_FILE"

You have also suggested this
--exclude "/rclonelog/tmp/.txt"
but this is basically what I was already doing and didn't worked, or is the path wrong? if so why?
--exclude "/mnt/user/Storage/CCTV/rclonelog/tmp/
.txt"

Great!

Yes, your filter path is wrong. The root of your filter is the top of your source (/mnt/user/Storage/CCTV) and destination (/Backup/CCTV) - that is the CCTV folder. So your filter should start with "/rclonelog..." not "/mnt/user/Storage/CCTV..."

1 Like

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