Archiving Log Files

This might be more of just a pi question but would like to know how to archive off old log files as they build up? I have opennas running and would like to auto migrate the files to the nas.

What have others done? Didnt really find what I was looking for when I did some searching.


Create a script that copies the log files where you want them to go.

Then copy that script to /etc/cron.daily. Every night at midnight the script will execute.

That is probably the simplest way to do it.

You could also edit the logrotate script in that same folder to make the logs rotate to your NAS destination rather than staying in /var/logs.

Excellent thanks! I should be able to figure that out!