home_server:home_server_setup:other_services:logrotate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
home_server:home_server_setup:other_services:logrotate [2022-09-05 Mon wk36 15:52] baumkphome_server:home_server_setup:other_services:logrotate [2023-12-26 Tue wk52 11:30] (current) – [Links] baumkp
Line 8: Line 8:
  
 edit the sudo crontab ''sudo crontab -e'': edit the sudo crontab ''sudo crontab -e'':
 +<code>
 Example of job definition: Example of job definition:
 # .---------------- minute (0 - 59) # .---------------- minute (0 - 59)
Line 18: Line 18:
 # *  *  *  *  *   user-name command to be executed # *  *  *  *  *   user-name command to be executed
 # 0  0  1  *  * /home/shared/Myscripts/rotatelog.sh /var/log/UPS/UPSLog.Log #Rotate NUT UPS log file # 0  0  1  *  * /home/shared/Myscripts/rotatelog.sh /var/log/UPS/UPSLog.Log #Rotate NUT UPS log file
 +</code>
  
 where ''/home/shared/Myscripts/rotatelog.sh'' is: where ''/home/shared/Myscripts/rotatelog.sh'' is:
Line 33: Line 34:
 </code> </code>
 Remember to make executable (''sudo chmod +x /home/shared/Myscripts/rotatelog.sh'') Remember to make executable (''sudo chmod +x /home/shared/Myscripts/rotatelog.sh'')
 +
 +====logrotate====
 +  -Install logrotate
 +    - debian: ''sudo apt install logrotate''
 +    - Arch: ''sudo pacman -S logrotate''
 +  *The main logrotate configuration file is here: ''/etc/logrotate.conf''
 +  *
 +
 +====Links====
 +[[https://www.linuxshelltips.com/rotate-logs-with-logrotate-linux/|How to Rotate Logs With Logrotate in Linux]]
  
  
-<- home_server:home_server_setup:other_services:samba|Prev ^ home_server:home_server_setup:other_services:index|Start page ^ home_server:home_server_setup:other_services:misc|Next ->+<- home_server:home_server_setup:other_services:samba|Prev ^ home_server:home_server_setup:other_services:index|Start page ^ home_server:home_server_setup:other_services:firmware|Next ->
  • /app/www/public/data/attic/home_server/home_server_setup/other_services/logrotate.1662364362.txt.gz
  • Last modified: 2023-04-30 Sun wk17 17:43
  • (external edit)