[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: (SOLVED) Logrotate don't route



David Jardine ha scritto:
On Tue, Jan 10, 2006 at 09:09:57PM +0100, Marco wrote:
David Jardine ha scritto:
On Mon, Jan 09, 2006 at 10:12:46PM +0100, Marco wrote:
Hi all,

I have make in /etc/logrotate.d a new file (as name backup) for rotate my backup's log.
This is the text in my file:
/var/log/backup {
  rotate 4
  monthly
  compress
  delaycompress
  missingok
  notifempty
  create 640 root adm
}
I have also restart my system, but my log don't route.
Have you tried it with the -f option, i.e,

logrotate -f /var/log/backup

>from the command line? If that works, it may be that your computer
was simply not switched on at the time logrotate should have been doing its job.

I David
I have try with "logrotate -f /var/log/backup I have these errors:

error: razor-agent.log:1 unknown option 'ott' -- ignoring line
error: razor-agent.log:1 unexpected text
error: razor-agent.log:2 unknown option 'ott' -- ignoring line
error: razor-agent.log:2 unexpected text
error: razor-agent.log:3 unknown option 'ott' -- ignoring line
error: razor-agent.log:3 unexpected text
error: razor-agent.log:4 unknown option 'ott' -- ignoring line
error: razor-agent.log:4 unexpected text
error: razor-agent.log:5 unknown option 'ott' -- ignoring line
error: razor-agent.log:5 unexpected text
...................
error: razor-agent.log:174 unknown option 'ott' -- ignoring line
error: razor-agent.log:174 unexpected text

This is the extract of my backup.log

ott 15 17:17:30 [Beta Backup System] Starting backup ...
ott 15 17:17:30 [Beta Backup System] logfile /var/backups/2005.10.15-17.17-beta-backup.log created
ott 15 17:17:38 [Beta Backup System] Backup finished.

Help :-(

Sorry, Marco, I wasn't thinking too clearly when I replied. The filename at the end of the command line must be the name of the configuration file.

The filename at the top of the configuration file must be the name of the file to be rotated.

Is your logfile named - exactly - "/var/log/backup"? If so,
	logrotate -f /etc/logrotate.d/backup

should work. In fact, it's more usual, I think, to put details in the /etc/logrotate.conf file, leaving the logrotate.d directory for packages to put their configurations in, but I can't see what difference it would make.

What seems to have happened is that logrotate looked for the configuration in your logfile and couldn't to anything with it. But I don't know what that "razor-agent" is all about. Perhaps you do...

I hope that works now.

Cheers,
David

I David,
I have try with logrotate -fv /var/log/backup and now work correctly. :-)

Thank you very much for your support!!!

Have a nice day!!!

Bye
Marco



Reply to: