0

By default log rotate shifts file name's index on each rotation. I would like to keep names for old files. On each rotation: create new files + delete outdated.

Reason: every time I am rsycn those files with another sever, I have to download ALL file instead of simply downloading newly created ONE file and removing outdated ONE file.

Thanks

Developer
  • 188
  • 1
  • 9
  • I presume you're using Linux and syslog, but you probably ought to say so explicitly. – ams Jan 11 '16 at 10:32
  • I doubt that it will help but I use CentOS. So far I have an idea to use short bash script which will handle file names before/after each rotation. – Developer Jan 11 '16 at 19:12
  • I noticed that logrotate can add suffix '-20160111' instead of 1, 2, 3 on some builds. How can control file format? IMPORTANT: file must not contain 1, 2, 3; it must contain only date. – Developer Jan 11 '16 at 22:26
  • 1
    Use `dateext` option — see the similar question: [rsync and logrotate](https://stackoverflow.com/questions/28800977/rsync-and-logrotate-transfers-old-logs-every-day). – ruvim Jun 09 '17 at 14:49

1 Answers1

0

This web site and its users simply s@cks! This web site dedicated to newbie questions, which later will be replied by another group of newbies who will use google search to copy&paste reply (have no clue what they are saying) or by replying irrelevant clarification posts.

Developer
  • 188
  • 1
  • 9