Logrotate in Linux | Logrotate configuration | Tech Arkit

Поделиться
HTML-код
  • Опубликовано: 11 дек 2024

Комментарии • 51

  • @TechArkit
    @TechArkit  4 года назад +4

    More Linux Videos ruclips.net/video/eEd9EgIWFBg/видео.html

    • @TechArkit
      @TechArkit  4 года назад +1

      Join Telegram Group: t.me/linuxarkit

  • @thallamudisrikanth7433
    @thallamudisrikanth7433 4 года назад +4

    Your technical stuff is very good... I really appreciate you... Keep going

    • @TechArkit
      @TechArkit  4 года назад +2

      Thanks for watching. Please subscribe the channel and support me Srikanth.

  • @ashoka5046
    @ashoka5046 4 года назад +1

    I am thankful sir for providing good quality details about logrotate

  • @sudheerparvathaneni4280
    @sudheerparvathaneni4280 4 года назад +1

    Nice job ravi.. keep going... keep rocking

  • @ManishDamodare-g6d
    @ManishDamodare-g6d Год назад +1

    I created one self log file to store application error message how i can set hourly to rotate my task on 4 time hourly basis

    • @TechArkit
      @TechArkit  Год назад +1

      Trigger the logrotate from cronjob on hourly bases.

  • @AbhishekSharma-tp3gx
    @AbhishekSharma-tp3gx 9 месяцев назад +1

    Hi wonderful video I have one doubt whether it deletes the rotated files or not?

    • @TechArkit
      @TechArkit  9 месяцев назад +1

      it will delete based on the policy you set.

  • @saikumarsivapuram1523
    @saikumarsivapuram1523 4 года назад +1

    In the example shown above suppose if I want to see only zip file of sample.log and the original file sample.log to be moved to the other folder like /mnt .How we can do that ?please explain

    • @TechArkit
      @TechArkit  4 года назад +1

      Good question, no need to move sample.log file because when you extract zip file it will extract with time stamp at the end.

  • @thedashh3675
    @thedashh3675 2 года назад +1

    How to run logrotator on custom time lets say 10 pm every day
    can you share cron job script???

    • @TechArkit
      @TechArkit  2 года назад +1

      Schedule it on Crontab logrotate -f logrotatefile.conf. OR update the logrorate crontab file.

    • @thedashh3675
      @thedashh3675 2 года назад +1

      @@TechArkit can you please share a script for a example
      I'm absolute beginner

  • @nathanpdkt
    @nathanpdkt 2 года назад +1

    It's very useful.thanks for making this video.

  • @linuxusers1255
    @linuxusers1255 3 года назад +1

    how can i logrotate of only on one configuration file....becouse when u r doing logrotate -f /etc/logrotate.conf ...all logs are rotating........

    • @TechArkit
      @TechArkit  3 года назад +1

      Create another lorotate.conf file with required log rotate files.

  • @lakshaymalik7215
    @lakshaymalik7215 2 года назад +1

    Hi, I want to rotate catalina.out file, could u pls suggest how to do, catalina.out is generated when tomcat is running on linux server and size is getting huge, need some solution, could u pls suggest

    • @TechArkit
      @TechArkit  2 года назад +1

      use similar configuration instead of .log replace with .out

  • @tariqrhussain
    @tariqrhussain 2 года назад +1

    when you create a custom logrotate file, what is the extension of that file or what is the file type? Can you share the command you used to create the logrotate file?

    • @TechArkit
      @TechArkit  2 года назад +1

      Just copy the existing logrotate file and change the definations

  • @8982121541
    @8982121541 3 года назад +1

    I am facing same problem in my job and after searching so much on internet i found this command to rotate logs . --log-opt max-size=10m --log-opt max-file=5 but i am unable to make it applicable in docker container to get the log of a service can someone please help me

    • @TechArkit
      @TechArkit  3 года назад +1

      your docker image might be missing required packages.

  • @sasikanth6026
    @sasikanth6026 4 года назад +1

    awesome explanation, thank you . as usual learnt a new topic.

    • @TechArkit
      @TechArkit  4 года назад +1

      Thanks Sasi, Please subscribe the channel.

  • @rahuldhiman7569
    @rahuldhiman7569 3 года назад +1

    Dear Arkit, can you make one more video for sending some .log file in /tmp directory to send through rsyslog to some syslog server

    • @TechArkit
      @TechArkit  3 года назад +2

      Just change the paths concept is same.

    • @rahuldhiman7569
      @rahuldhiman7569 3 года назад +1

      @@TechArkit thanks Arkit, let me try this out.

  • @harshadashinde5775
    @harshadashinde5775 3 года назад +1

    Thank you so much, it helped a lot! :)

  • @balamurugan.nandhu
    @balamurugan.nandhu 3 года назад +1

    Really good. I want to know whether we can rotate a non .log (message.json) file through this? If yes may I know the config snippet?

    • @TechArkit
      @TechArkit  3 года назад +2

      Yes, you can do, instead of .log mention the extension you wanted to rotate, but it should be text format.

  • @d.j.selvaraj6429
    @d.j.selvaraj6429 4 года назад +1

    Hi Ravi, Thanks for the session and it was useful. I am new to Linux.. I have a requirement where i need to keep last 6month log files and remove older than 6month log file.. Please provide steps how to ahieve this?.. Thanks in advance.

    • @d.j.selvaraj6429
      @d.j.selvaraj6429 4 года назад +2

      /var/log/tibco/AddressService/*.log
      {
      missingok
      monthly
      rotate 6
      notifempty
      }
      This script can i add in the logrotate.conf

    • @TechArkit
      @TechArkit  4 года назад +2

      My solution would be like this: Rotate the log file daily, after rotation move the files to archive path like: /var/log/tibco/AddressService/Archive delete the files older than six months in archive.
      This way you will avoid large log files and easy to verify later point of time.
      Your solution also works.

  • @techworldz369
    @techworldz369 4 года назад +1

    Thanks bro it is going to help a lot

    • @TechArkit
      @TechArkit  4 года назад +1

      Yes it will, Thank you.

  • @yogeshwaranify
    @yogeshwaranify 2 года назад +1

    Fantastic sir

  • @rajeshkannam
    @rajeshkannam 4 года назад +1

    Great Video