What is the problem you are having with rclone?
I want to get cron emails from rclone when files were copied or when an error occurred. No emails otherwise. I found How to print a list of files synced/copied? but it's not enough because I get extra output printed:
$ rclone --transfers 3 --tpslimit 12 --stats-one-line -v move ...
2023/07/16 19:26:56 INFO : Starting transaction limiter: max 12 transactions/s with burst 1
2023/07/16 19:26:59 INFO : There was nothing to transfer
2023/07/16 19:26:59 INFO : 0 B / 0 B, -, 0 B/s, ETA -
2023/07/16 19:26:59 INFO : Starting transaction limiter: max 12 transactions/s with burst 1
2023/07/16 19:27:02 INFO : There was nothing to transfer
2023/07/16 19:27:02 INFO : 0 B / 0 B, -, 0 B/s, ETA -
2023/07/16 19:27:02 INFO : Starting transaction limiter: max 12 transactions/s with burst 1
2023/07/16 19:27:06 INFO : There was nothing to transfer
2023/07/16 19:27:06 INFO : 0 B / 0 B, -, 0 B/s, ETA -
2023/07/16 19:27:06 INFO : Starting transaction limiter: max 12 transactions/s with burst 1
2023/07/16 19:27:09 INFO : There was nothing to transfer
2023/07/16 19:27:09 INFO : 0 B / 0 B, -, 0 B/s, ETA -
2023/07/16 19:27:09 INFO : Starting transaction limiter: max 12 transactions/s with burst 1
2023/07/16 19:27:13 INFO : There was nothing to transfer
2023/07/16 19:27:13 INFO : 0 B / 0 B, -, 0 B/s, ETA -
2023/07/16 19:27:14 INFO : Starting transaction limiter: max 12 transactions/s with burst 1
2023/07/16 19:27:22 INFO : x$d1828-Playing With Prolog-Guest Lecture for Intro to SWI-Prolog by Dr. Jan W-5raU9tHeKzo.m4a: Copied (new)
2023/07/16 19:27:22 INFO : x$d1828-Playing With Prolog-Guest Lecture for Intro to SWI-Prolog by Dr. Jan W-5raU9tHeKzo.m4a: Deleted
2023/07/16 19:27:22 INFO : 54.371 MiB / 54.371 MiB, 100%, 7.766 MiB/s, ETA 0s
What I want is the output of the above command but as if 2>&1 | grep -v -e "Starting transaction limiter" -e "There was nothing to transfer" -e "0 B / 0 B, -, 0 B/s, ETA -"
was applied (without having to use grep and most importantly, to mess with stderr redirection):
$ rclone-archive.sh 2>&1 | grep -v -e "Starting transaction limiter" -e "There was nothing to transfer" -e "0 B / 0 B, -, 0 B/s, ETA -"
# no output, cron does not email
$ rclone-archive.sh 2>&1 | grep -v -e "Starting transaction limiter" -e "There was nothing to transfer" -e "0 B / 0 B, -, 0 B/s, ETA -"
2023/07/16 19:28:27 INFO : x$d2111-TwoSetViolin-Ling Ling Workout Ft. @ChloeChuaviolinist-blHEB0iYoIo.m4a: Copied (new)
2023/07/16 19:28:27 INFO : x$d2111-TwoSetViolin-Ling Ling Workout Ft. @ChloeChuaviolinist-blHEB0iYoIo.m4a: Deleted
2023/07/16 19:28:27 INFO : 15.977 MiB / 15.977 MiB, 100%, 5.312 MiB/s, ETA 0s
Is it possible? Thank you in advance!
Run the command 'rclone version' and share the full output of the command.
rclone v1.59.1
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-76-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.5
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Should not matter.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
See above.
The rclone config contents with secrets removed.
Should not matter, only remote secrets are there.
A log from the command with the -vv
flag
Should not matter