Hi all
We've been using the rclone log function and it's been immensely helpful. However, we're running into a funny issue where the size of the file for some of our servers is getting large. It's currently not unmanageable but ideally we would like to limit the file size.
Is there any way to do this within the tool itself?
asdffdsa
(jojothehumanmonkey)
January 29, 2020, 5:06pm
2
if you run rclone in a script you have several options.
delete the old log before running rclone.
if you want to keep the old log, rename the old log by appending the date and time to it.
jcastill
(Jose)
January 30, 2020, 6:26am
3
you should be able to add it to logrotate.
To clarify, we're trying to set up an automated pipeline with rclone running a continuous rc command as a windows service at the source of data.
Of course, in this case ideally we'd not have to restart the service everytime we want to delete the log file.
Would a simple operations/deletefile work even if the log file is in use?
Thanks
ncw
(Nick Craig-Wood)
January 30, 2020, 6:51pm
5
There is an issue about this. https://github.com/rclone/rclone/issues/2259 which show how to configure logrotate.
ncw
(Nick Craig-Wood)
January 30, 2020, 6:52pm
6
You meet to truncate the file rather than deleting in otherwise rclone will carry on writing to the deleted file
Essentially would this restart the log file in terms of size? Even if I can't save the old file I'm happy for it to start from blank again.
ncw
(Nick Craig-Wood)
January 30, 2020, 8:56pm
8
Yes
If you want to keep the old log then copy it before truncating it.
system
(system)
Closed
April 29, 2020, 9:09pm
9
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.