Logo Ajo Mathew
  • Home
  • About
  • Skills
  • Experiences
  • Education
  • Posts
  • Notes
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo
  • Tags
  • ACI
  • Alert-Processing-Rules
  • ARM
  • Automation
  • Azure
  • Azure Container Groups
  • Azure Container Instances
  • Azure DevOps
  • Azure Network Service Tags
  • Azure-Monitor
  • Azurerm
  • Blob
  • CI
  • Copy Function
  • Customization
  • DevOps
  • DSC
  • Dual Boot
  • English
  • Function
  • Git
  • Linux
  • Logrotate
  • Monitoring
  • Multiple Resource Properties
  • Notion
  • NSG
  • Pipeline
  • Planned-Maintenance
  • POP
  • Powershell
  • PTE
  • Send-Mailmessage
  • Sendgrid
  • Smtp
  • SQL
  • Tar
  • Terraform
  • Timedatectl
  • Tips
  • UIEF
  • Variables
  • Vivaldi
  • Vscode
  • Windows
  • YAML
Hero Image
Linux Log Rotate and archive rotated file.

I was checking an article on how to upload archived logs to azure blob. As initial set up I’ve updated logrotate.conf(/etc/logrotate.conf) with below settings. file to edit: /etc/logrotate.conf {% gist 5d2a8a1bf8cb0f619b45a39785dee395 %} Then updated syslog rotate config to test on how messages files can be archived. Make sure the destination path is created. In this case I’ve got /opt/logs/ referenced. file edited /opt/logrotate.d/syslog {% gist bacb68f7f66e346d1d80f2a934c00856 %} This will ensure the last rotated log file would be copied to /opt/logs/. You can have any other scripts configured to upload to blob from here. Once these settings are in place test run(force run) logrotate -f /etc/logrotate.conf. Result of the operation can be found below

  • logrotate
  • tar
  • Azure
  • Blob
Tuesday, May 8, 2018 | 2 minutes Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
Contact me:
  • ajomathiu@gmail.com
  • ajomathew
  • Ajo Mathew

Toha Theme Logo Toha
© 2026 Ajo Mathew.
Powered by Hugo Logo