rsync & rotated logs

jw schultz jw at
Wed Feb 25 23:43:04 GMT 2004

On Wed, Feb 25, 2004 at 11:14:47PM +0100, Andrzej Filip wrote:
> What is the best way to keeps rsynced copy of rotate log files ?
> x.log -> x.log.1 -> x.log.2.gz -> ...
> Can rsync "notice" changes of file name and avoid needless synchronization ?

Change how you rotate log files so that once rotated the old
files don't change names.

x.log -> x.log.yyyymmdd.gz

If you are using logrotate there is a patch at SuSE for it
to do this and Red Hat (owner of logrotate) has an open
enhancement request to add the feature.

	J.W. Schultz            Pegasystems Technologies
	email address:		jw at

		Remember Cernan and Schmitt

More information about the rsync mailing list