Logrotate rsync server

29 03 2014

In my previous posts, I described how to backup the Synology NAS to an ubuntu-based rsync server. I found out that rsync server doesn’t automatically set a log rotation when installed, thus my logs went quite large.
Here is how you can manage the problem.
Create the file /etc/logrotate.d/rsynclog as follows:
/var/log/rsync.log {
rotate 5
mail yourmail@domain.com
size=5+
copytruncate
compress
missingok
notifempty
}

When your logs get 5MB they will be compressed and rotated for a maximum of 5 times. Some notification will be sent to your email.

For a complete list of commands of the logrotation google welcomes you.

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s




%d bloggers like this: