ntushar
(Tushar)
March 11, 2019, 9:04am
1
Hi,
I want STDOUT logs to be written to one file and STDERR logs to be written to another file. I use below command to sync to google drive
rclone sync /storage/backup/week2 gdrive:backup/weekly -l --backup-dir gdrive:backup/incremental/date +%Y-%m-%d
-c --fast
-list --tpslimit 20 --log-level INFO --stats 0 1>/tmp/rclone.log 2>/tmp/rclone-error.log
All rclone logs are written to /tmp/rclone-error.log. Why this is happening.
I want STDOUT logs to be written to one file and STDERR logs to be written to another file. how can i achieve this.
ncw
(Nick Craig-Wood)
March 11, 2019, 9:24am
2
I think what you have written does exactly that. Rclone only logs to STDERR normally.
What output do you want in the /tmp/rclone.log
file?
ntushar
(Tushar)
March 12, 2019, 6:25am
3
STDOUT log file (/tmp/rclone.log) is emtpy and all INFO logs are written to STDERR log file(/tmp/rclone-error.log).
Infact i want rclone to write all INFO logs to STDOUT log file (/tmp/rclone.log) and if there is any error during rclone sync i want those error logs to be written to STDERR log file(/tmp/rclone-error.log).
ntushar
(Tushar)
March 12, 2019, 7:39am
4
Is there any option to print stats only at end of sync and not every 1 minutes, 5 minutes or any other time.
I want below kind of stats to be printed only at end of sync
Transferred: 137 / 137 Bytes, 100%, 4 Bytes/s, ETA 0s
Errors: 0
Checks: 4744 / 4744, 100%
Transferred: 1 / 1, 100%
Elapsed time: 31.5s
ncw
(Nick Craig-Wood)
March 12, 2019, 8:16am
5
If you set the stats interval to very large that will have the same effect, eg --stats 99d
ntushar
(Tushar)
March 13, 2019, 6:07am
6
I tried below command
rclone sync /storage/backup/week2 gdrive:backup/weekly -l --backup-dir gdrive:backup/incremental/date +%Y-%m-%d -c --fast-list --tpslimit 20 --log-level INFO --stats 99d 1>/tmp/rclone.log 2>/tmp/rclone-error.log
and now i have below error
Error: invalid argument β99dβ for ββstatsβ flag: time: unknown unit d in duration 99d
ntushar
(Tushar)
March 13, 2019, 6:40am
7
I solved this by specifying below command
rclone sync /storage/backup/week2 gdrive:backup/weekly -l --backup-dir gdrive:backup/incremental/date +%Y-%m-%d -c --fast-list --tpslimit 20 --log-level INFO --stats 129600m 1>/tmp/rclone.log 2>/tmp/rclone-error.log
1 Like
system
(system)
Closed
March 16, 2019, 6:40am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.