Newb question on how to write out a log file

How can i get rclone to log the filename it moves/backsup to a cloud store, i tried the documentation. Sorry home user using it for backup using ubuntu server 16.04 to BackBlaze.

1 Like

Here’s my example:

felix@gemini:~/logs$ tail upload.log
2019/01/11 03:18:26 INFO  : TV/Vikings/Vikings.S05E17.mkv: Deleted
2019/01/11 03:18:45 INFO  : TV/The.Gifted/The.Gifted.S02E11.mkv: Copied (new)
2019/01/11 03:18:45 INFO  : TV/The.Gifted/The.Gifted.S02E11.mkv: Deleted
2019/01/11 03:18:45 INFO  :
Transferred:   	   32.622G / 32.622 GBytes, 100%, 82.671 MBytes/s, ETA 0s
Errors:                 0
Checks:                26 / 26, 100%
Transferred:           26 / 26, 100%
Elapsed time:       6m44s

felix@gemini:~/logs$ cat ~/scripts/upload_cloud
# RClone Config file
LOCKFILE="/var/lock/`basename $0`"

  # Wait for lock for 5 seconds
  flock -x -w 5 200 || exit 1

# Move older local files to the cloud
/usr/bin/rclone move /data/local/ gcrypt: -P --checkers 3 --log-file /home/felix/logs/upload.log -v --tpslimit 3 --transfers 3 --drive-chunk-size 32M --exclude-from /home/felix/scripts/excludes --delete-empty-src-dirs

) 200> ${LOCKFILE}
1 Like

This works for me:

screen -dmS rclone-01 bash -c 'rclone sync --progress --log-level INFO --log-file /root/.config/rclone/upload.log /local rclone-01:/rclone-01 2>&1 | tee /root/.config/rclone/rclone-01.log'

This is the full command:

screen -dmS rclone-01 bash -c 'rclone sync --bwlimit 6M --progress --checksum --no-update-modtime --transfers 10 --checkers 8 --tpslimit 10 --update --filter-from /root/.config/rclone/filter-file.txt --drive-acknowledge-abuse --drive-pacer-burst 50 --drive-use-trash=false --log-level INFO --low-level-retries 30 --log-file /root/.config/rclone/upload.log /local rclone-01:/rclone-01 2>&1 | tee /root/.config/rclone/rclone-01.log'

You don't need to use screen to achieve the goal, but I recommend using it anyway.

The -v flag will show that info.

Use --log-file to save that to a file if you don't want to collect it from stderr.