How to log md5sum to logfile when using rclone local source to remote

What is the problem you are having with rclone?

log md5sum to log when using rclone local source to remote
when using '''rclone copy -Pvv speedtest-go gd:tool'''
in the output
2022-12-04 08:05:27 DEBUG : speedtest-go: md5 = '''2897864bad4862b908e6c17cb3d5d77f OK'''
already logged md5 hash,but I want it to log in logfile.
Then I don't need to run rclone md5sum localfile

rclone copy -Pvv speedtest-go gd:tool

I've read Uploading to remote and calculating local md5sum on the fly ,did't figure it out

rclone copy -Pvv --log-file=mylogfile.txt speedtest-go_1.2.1_Linux_x86_64.tar.gz gd:tool

mylogfiel.txt logged like '''2022/12/04 08:18:08 DEBUG : speedtest-go_1.2.1_Linux_x86_64.tar.gz: md5 = 893d24ffa6bf04f68f5a696cafa08ec9 OK

Md5 hash logged,but too much info,I want just md5 hash logged.

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

rclone v1.60.1

  • os/version: debian 11.5 (64 bit)
  • os/kernel: 5.10.0-19-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.19.3
  • go/linking: static
  • go/tags: none

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

Google Drive

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

rclone copy -Pvv speedtest-go gd:tool

The rclone config contents with secrets removed.

[gd]
type = drive
client_id = XXXXXXXXXXXX
client_secret = XXXXXXXXX
scope = drive
token = 
team_drive =

A log from the command with the -vv flag

2022/12/04 08:05:23 DEBUG : rclone: Version "v1.60.1" starting with parameters ["rclone" "copy" "-Pvv" "speedtest-go" "gd:tool"]
2022/12/04 08:05:23 DEBUG : Creating backend with remote "speedtest-go"
2022/12/04 08:05:23 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/12/04 08:05:23 DEBUG : fs cache: adding new entry for parent of "speedtest-go", "/root"
2022/12/04 08:05:23 DEBUG : Creating backend with remote "gd:tool"
2022/12/04 08:05:23 DEBUG : Google drive root 'tool': 'root_folder_id = XXXXXXXXXX' - save this in the config to speed up startup
2022-12-04 08:05:24 DEBUG : speedtest-go: Need to transfer - File not found at Destination
2022-12-04 08:05:27 DEBUG : speedtest-go: md5 = 2897864bad4862b908e6c17cb3d5d77f OK
2022-12-04 08:05:27 INFO  : speedtest-go: Copied (new)
Transferred:        6.148 MiB / 6.148 MiB, 100%, 2.048 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         3.9s
2022/12/04 08:05:27 INFO  : 
Transferred:        6.148 MiB / 6.148 MiB, 100%, 2.048 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         3.9s

hello and welcome to the forum,

for each run of rclone, my script scans the log file for regex
could iterate over the log file, in this case python regex

^.* DEBUG : (.*): md5 = (.*) OK$

asdffdsa,thank you for your reply .
I know regex can solve this,but still kind of difficult for me.
But you remind me one thing,maybe put all the log into office-excel,then only show the lines with md5?
My PC don't have Office installed, I will try in my office laptop.

what do you plan to do with the list of hashes?

Sorry for reply too late.
I record md5 hashes in case of when download from the cloud storage archive,files are broken.

Maybe the cloudstorage worth trust.
But the program sending and receiving I don't.

I have bad experience with another cloud storage provider.
I uploaded a ISO,oneday,I download,use rufus to burn it into usb stick.
But in installing to a server,there always have errors.I am confused.
Compared the md5 hashes from the source publisher and my cloud storage one,they're diffrent.
I used the cloud storage priovider official client,I dont' know what happend.
So there are three hashes,official, cloud storage one ,downloaded local damaged.

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