I want logrotate
to copy and truncate log file and use olddir on different physical disk. According to manual, olddir can't be on different physical disk because default behaviour of logrotate is to only rename original log file, which wouldn't be possible with different physical disk.
Well, but I am using copytruncate
directive, which makes a copy of original file and then truncates original file. So there shouldn't be problem with moving newly copied file to different location on different physical disk.
But when I run logrotate, it still complains about logfile and olddir beeing on different devices.
Is there any way around it ? Possibly running some custom postrotate script which would move log files to desired location ?