Rclone Sync Logs

What is the problem you are having with rclone?

I want to know if it is possible to list all files changed in rclone sync for example if Text.txt is added to my destination I want to know if its possible to make rclone tell me that Text.txt has been added to destination drive. Found Answer

Also is there a way to get the file ID of that copied file from rclone. Thank you! Found Answer

Is there a way to get the drive ID of the file that is copied to the destination.

What is your rclone version (output from rclone version)

rclone v1.54.0-beta.4794.db4bbf952

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10, 64 bit

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 sync source: dest:

hello and welcome to the forum,

each time i run rclone, my python script parses the log file looking for errors and other content.

Can you provide me that script?

keep in mind, i am a self taught programmer, started with MS-BASIC and i know that there is better code to be found.

this snippet will search for for ERROR :

if os.path.isfile(RcloneLFN) and 'ERROR :' in open(RcloneLFN).read(): 

many of my log files are very, very long. so this snippet will open a rclone log file, filter out certain text and write a new shorter log file.

source= open(RcloneLFN, "r")
dest=open(RcloneShortLFN, "w")
str1="Size and modification time the same"
str2="multipart upload starting chunk"
str3="Unchanged skipping"
str4="Waiting for checks to finish"
str5="Waiting for transfers to finish"
str6="Waiting for deletions to finish"
str7="Excluded from sync"
str = r'^\d\d\d\d\/\d\d\/\d\d\s\d\d:\d\d:\d\d\sDEBUG\s:\s.*:\sOK$'
for line in source:
    if line.find(str1) >= 0 or line.find(str2) >= 0 or line.find(str3) >= 0 or line.find(str4) >= 0 or line.find(str5) >= 0 or line.find(str6) >= 0 or line.find(str7) >= 0:
    elif re.search(str, line):

Thank you so much!

sure, let me know what else you need

I ended up just using this quick node.js script I made because I only want to see files that got copied and it works like a charm, thank you for the idea of parsing the logffile!

let file = "";
const startProgram = async function(){
	const data = await require("fs").readFileSync("./rclonelog.txt", 'utf-8')
	const lines = data.split("\n")
	for(const line of lines){
		if(line.includes("Copied (server side copy)")){
			const fileName = line.split(/:|\//)[line.split(/:|\//).length -2].trim()
			file += fileName + "\n"
			require("fs").writeFileSync("copiedFiles.txt", file)

Is there any way to show the drive ID of the files being transferred in the log?

rclone lsf --format=o gdrive-a1b2:iso.windows.custom/custom/winserver/virtio/virtio-win-gt-x64.msi 

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