Newb question on how to write out a log file


#1

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.


#2

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
#!/bin/bash
# RClone Config file
RCLONE_CONFIG=/data/rclone/rclone.conf
export RCLONE_CONFIG
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}