Difference between revisions of "Limit the size of .log files & the journal"

imported>Handy
imported>Handy
Line 199: Line 199:
   missingok
   missingok
  ## after the files have been rotated run the following command
  ## after the files have been rotated run the following command
  postrotate
## move any files with the .gz extension to /var/log/old
    mv /var/log/*.gz /var/log/old
## closes the postrotate section
  endscript
## ends the command sequence of this block of script
   }  
   }  


You also need to create the /var/log/old directory if it doesn't already exist. This is where the .gzipped daily backup files will be kept.
<br clear="all"/>


<br clear="all"/>
=== A Summary of the above example thus far ===
=== A Summary of the above example thus far ===


Anonymous user