How to exclude a service under /etc/logrotate.d/ to run with the main logrotate jobLogrotate ERROR: No file...

What Happens when Passenger Refuses to Fly Boeing 737 Max?

Life insurance that covers only simultaneous/dual deaths

Does Linux have system calls to access all the features of the file systems it supports?

What exactly is the purpose of connection links straped between the rocket and the launch pad

Why does Deadpool say "You're welcome, Canada," after shooting Ryan Reynolds in the end credits?

Do items de-spawn in Diablo?

Why don't MCU characters ever seem to have language issues?

Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?

Playing ONE triplet (not three)

Co-worker team leader wants to inject the crap software product of his friends into our development. What should I say to our common boss?

What to do when during a meeting client people start to fight (even physically) with each others?

What happens with multiple copies of Humility and Glorious Anthem on the battlefield?

What does it mean when multiple 々 marks follow a 、?

Is all copper pipe pretty much the same?

validation vs test vs training accuracy, which one to compare for claiming overfit?

Unreachable code, but reachable with exception

Why must traveling waves have the same amplitude to form a standing wave?

How to deal with a cynical class?

Examples of odd-dimensional manifolds that do not admit contact structure

Single word request: Harming the benefactor

"However" used in a conditional clause?

How could a female member of a species produce eggs unto death?

How do anti-virus programs start at Windows boot?

Touchscreen-controlled dentist office snowman collector game



How to exclude a service under /etc/logrotate.d/ to run with the main logrotate job


Logrotate ERROR: No file found for /var/log/apache*/*error.logRunning a cron job manually and immediatelyLogrotate Mysql - No rotate happenslogrotate not rotating the logsLinux logrotate offset delayApache log files rotationcron job doesn't run under specific accountnginx logs just failed weekly rotate, how do I determine why?awslinux /etc/cron.daily doesn't execute logrotate fileLogrotate installed, settings for nginx duplicated between two servers…but different log file sizes













0















I have a file under logrotate.d that I would like not to run when the main logrotate is running.
I have created a separate job for this in /etc/crontab



45 23   * * *   root    mv /var/log/RemoteSystems/*/*.log /var/log/Archiv/ && logrotate /etc/logrotate.d/test  


The job will move the files from a directory to another and then will apply logrotate. I would like that this job to run separately from main logrotate job in /etc/crontab. The problem is that because "test" is under /etc/logrotate.d/, it will run once again with the main logrotate.
Is there any command that I can insert in logrotate.conf that can exclude "test" to run?
I know that if I am having "test" file out of /etc/logrotate.d, this will not happen, but I would like to keep "test" at the same path.










share|improve this question
















bumped to the homepage by Community 9 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I have a file under logrotate.d that I would like not to run when the main logrotate is running.
    I have created a separate job for this in /etc/crontab



    45 23   * * *   root    mv /var/log/RemoteSystems/*/*.log /var/log/Archiv/ && logrotate /etc/logrotate.d/test  


    The job will move the files from a directory to another and then will apply logrotate. I would like that this job to run separately from main logrotate job in /etc/crontab. The problem is that because "test" is under /etc/logrotate.d/, it will run once again with the main logrotate.
    Is there any command that I can insert in logrotate.conf that can exclude "test" to run?
    I know that if I am having "test" file out of /etc/logrotate.d, this will not happen, but I would like to keep "test" at the same path.










    share|improve this question
















    bumped to the homepage by Community 9 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I have a file under logrotate.d that I would like not to run when the main logrotate is running.
      I have created a separate job for this in /etc/crontab



      45 23   * * *   root    mv /var/log/RemoteSystems/*/*.log /var/log/Archiv/ && logrotate /etc/logrotate.d/test  


      The job will move the files from a directory to another and then will apply logrotate. I would like that this job to run separately from main logrotate job in /etc/crontab. The problem is that because "test" is under /etc/logrotate.d/, it will run once again with the main logrotate.
      Is there any command that I can insert in logrotate.conf that can exclude "test" to run?
      I know that if I am having "test" file out of /etc/logrotate.d, this will not happen, but I would like to keep "test" at the same path.










      share|improve this question
















      I have a file under logrotate.d that I would like not to run when the main logrotate is running.
      I have created a separate job for this in /etc/crontab



      45 23   * * *   root    mv /var/log/RemoteSystems/*/*.log /var/log/Archiv/ && logrotate /etc/logrotate.d/test  


      The job will move the files from a directory to another and then will apply logrotate. I would like that this job to run separately from main logrotate job in /etc/crontab. The problem is that because "test" is under /etc/logrotate.d/, it will run once again with the main logrotate.
      Is there any command that I can insert in logrotate.conf that can exclude "test" to run?
      I know that if I am having "test" file out of /etc/logrotate.d, this will not happen, but I would like to keep "test" at the same path.







      linux cron logrotate exclude






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 4 '17 at 12:46









      Khaled

      31.3k65487




      31.3k65487










      asked Mar 4 '17 at 10:06









      IoanIoan

      12




      12





      bumped to the homepage by Community 9 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 9 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          4 Answers
          4






          active

          oldest

          votes


















          0














          By placing the file test in the /etc/logrotate.d/ directory, it is going to be picked up by logrotate automatically.



          If you're wanting to run it manually, you can force it to carry out logrotate on the particular file no matter the location.



          logrotate --force /tmp/test


          Where /tmp/test is the new location of the file.






          share|improve this answer
























          • I would like to keep "test" file under logrotate.d/ Thanks!

            – Ioan
            Mar 4 '17 at 19:13





















          0














          If you look at the manual man logrotate.conf, you can read find tabooext option which enables you to exclude some files with specific extensions.



          tabooext [+] list
          The current taboo extension list is changed (see the include directive for information on the taboo extensions). If a + precedes the
          list of extensions, the current taboo extension list is augmented, otherwise it is replaced. At startup, the taboo extension list
          contains .rpmsave, .rpmorig, ~, .disabled, .dpkg-old, .dpkg-dist, .dpkg-new, .dpkg-bak, .dpkg-del, .cfsaved, .ucf-old, .ucf-dist,
          .ucf-new, .rpmnew, .swp, .cfsaved, .rhn-cfg-tmp-*


          You can choose one of the default excluded extensions like .disabled or you can specifiy your own additional extension like:



          tabooext + .test


          All you need to do is to rename your file /etc/logrotate.d/test to have any of these extensions like /etc/logrotate.d/test.disabled.






          share|improve this answer
























          • Yes, I read this, but I would like to keep the name as it is. I thought that maybe there is a line that I can add it in logrotate.conf in order to exclude "test" file... it seems there is not. Thanks!

            – Ioan
            Mar 4 '17 at 19:17








          • 1





            @Ioan: So, you want to exclude a file without doing any change!!

            – Khaled
            Mar 5 '17 at 8:08











          • I do want to do a change, but I thought that maybe there is a command that I can add in logrotate.conf. in order to exclude "test" . It seems there is not. Thank you.

            – Ioan
            Mar 5 '17 at 9:06





















          0














          If you don't want to touch "test", you could try to modify the include /etc/logrotate.d directive in /etc/logrotate.conf. By default it refers to a directory and thus parses all files in that directory, except for some file extensions.



          What you can try is, modify the include directory to refer to individual files under /etc/logrotate.d, example /etc/logrotate.d/apt etc. You exclude "test" from that list. I haven't tested this, but it might be worth trying.






          share|improve this answer
























          • This could be a sollution. The problem is I am not the only one that is administrating this system and I am thinking that if someone is adding a file under /etc/logrotate.d/ will expect this to run. In conclusion, I don't want to touch any global setting. I didn't test it so far, but maybe I will create another directory under logrotate.d and put the file under this directory. As far as I understood, logrotate will not look after files under directories. Thanks!

            – Ioan
            Mar 4 '17 at 19:27



















          0














          You could edit the config file as below:



          before



          include /etc/logrotate.d


          after



          include /etc/logrotate.d/*.conf


          This should make only files ending .conf in /etc/logrotate.d/ to be picked up by logrotate excluding your test file



          If you already have files in /etc/logrotate.d/ being used by logrotate, these would need updated to include .conf






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "2"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f836253%2fhow-to-exclude-a-service-under-etc-logrotate-d-to-run-with-the-main-logrotate%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            4 Answers
            4






            active

            oldest

            votes








            4 Answers
            4






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            By placing the file test in the /etc/logrotate.d/ directory, it is going to be picked up by logrotate automatically.



            If you're wanting to run it manually, you can force it to carry out logrotate on the particular file no matter the location.



            logrotate --force /tmp/test


            Where /tmp/test is the new location of the file.






            share|improve this answer
























            • I would like to keep "test" file under logrotate.d/ Thanks!

              – Ioan
              Mar 4 '17 at 19:13


















            0














            By placing the file test in the /etc/logrotate.d/ directory, it is going to be picked up by logrotate automatically.



            If you're wanting to run it manually, you can force it to carry out logrotate on the particular file no matter the location.



            logrotate --force /tmp/test


            Where /tmp/test is the new location of the file.






            share|improve this answer
























            • I would like to keep "test" file under logrotate.d/ Thanks!

              – Ioan
              Mar 4 '17 at 19:13
















            0












            0








            0







            By placing the file test in the /etc/logrotate.d/ directory, it is going to be picked up by logrotate automatically.



            If you're wanting to run it manually, you can force it to carry out logrotate on the particular file no matter the location.



            logrotate --force /tmp/test


            Where /tmp/test is the new location of the file.






            share|improve this answer













            By placing the file test in the /etc/logrotate.d/ directory, it is going to be picked up by logrotate automatically.



            If you're wanting to run it manually, you can force it to carry out logrotate on the particular file no matter the location.



            logrotate --force /tmp/test


            Where /tmp/test is the new location of the file.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 4 '17 at 11:29









            user403677user403677

            1




            1













            • I would like to keep "test" file under logrotate.d/ Thanks!

              – Ioan
              Mar 4 '17 at 19:13





















            • I would like to keep "test" file under logrotate.d/ Thanks!

              – Ioan
              Mar 4 '17 at 19:13



















            I would like to keep "test" file under logrotate.d/ Thanks!

            – Ioan
            Mar 4 '17 at 19:13







            I would like to keep "test" file under logrotate.d/ Thanks!

            – Ioan
            Mar 4 '17 at 19:13















            0














            If you look at the manual man logrotate.conf, you can read find tabooext option which enables you to exclude some files with specific extensions.



            tabooext [+] list
            The current taboo extension list is changed (see the include directive for information on the taboo extensions). If a + precedes the
            list of extensions, the current taboo extension list is augmented, otherwise it is replaced. At startup, the taboo extension list
            contains .rpmsave, .rpmorig, ~, .disabled, .dpkg-old, .dpkg-dist, .dpkg-new, .dpkg-bak, .dpkg-del, .cfsaved, .ucf-old, .ucf-dist,
            .ucf-new, .rpmnew, .swp, .cfsaved, .rhn-cfg-tmp-*


            You can choose one of the default excluded extensions like .disabled or you can specifiy your own additional extension like:



            tabooext + .test


            All you need to do is to rename your file /etc/logrotate.d/test to have any of these extensions like /etc/logrotate.d/test.disabled.






            share|improve this answer
























            • Yes, I read this, but I would like to keep the name as it is. I thought that maybe there is a line that I can add it in logrotate.conf in order to exclude "test" file... it seems there is not. Thanks!

              – Ioan
              Mar 4 '17 at 19:17








            • 1





              @Ioan: So, you want to exclude a file without doing any change!!

              – Khaled
              Mar 5 '17 at 8:08











            • I do want to do a change, but I thought that maybe there is a command that I can add in logrotate.conf. in order to exclude "test" . It seems there is not. Thank you.

              – Ioan
              Mar 5 '17 at 9:06


















            0














            If you look at the manual man logrotate.conf, you can read find tabooext option which enables you to exclude some files with specific extensions.



            tabooext [+] list
            The current taboo extension list is changed (see the include directive for information on the taboo extensions). If a + precedes the
            list of extensions, the current taboo extension list is augmented, otherwise it is replaced. At startup, the taboo extension list
            contains .rpmsave, .rpmorig, ~, .disabled, .dpkg-old, .dpkg-dist, .dpkg-new, .dpkg-bak, .dpkg-del, .cfsaved, .ucf-old, .ucf-dist,
            .ucf-new, .rpmnew, .swp, .cfsaved, .rhn-cfg-tmp-*


            You can choose one of the default excluded extensions like .disabled or you can specifiy your own additional extension like:



            tabooext + .test


            All you need to do is to rename your file /etc/logrotate.d/test to have any of these extensions like /etc/logrotate.d/test.disabled.






            share|improve this answer
























            • Yes, I read this, but I would like to keep the name as it is. I thought that maybe there is a line that I can add it in logrotate.conf in order to exclude "test" file... it seems there is not. Thanks!

              – Ioan
              Mar 4 '17 at 19:17








            • 1





              @Ioan: So, you want to exclude a file without doing any change!!

              – Khaled
              Mar 5 '17 at 8:08











            • I do want to do a change, but I thought that maybe there is a command that I can add in logrotate.conf. in order to exclude "test" . It seems there is not. Thank you.

              – Ioan
              Mar 5 '17 at 9:06
















            0












            0








            0







            If you look at the manual man logrotate.conf, you can read find tabooext option which enables you to exclude some files with specific extensions.



            tabooext [+] list
            The current taboo extension list is changed (see the include directive for information on the taboo extensions). If a + precedes the
            list of extensions, the current taboo extension list is augmented, otherwise it is replaced. At startup, the taboo extension list
            contains .rpmsave, .rpmorig, ~, .disabled, .dpkg-old, .dpkg-dist, .dpkg-new, .dpkg-bak, .dpkg-del, .cfsaved, .ucf-old, .ucf-dist,
            .ucf-new, .rpmnew, .swp, .cfsaved, .rhn-cfg-tmp-*


            You can choose one of the default excluded extensions like .disabled or you can specifiy your own additional extension like:



            tabooext + .test


            All you need to do is to rename your file /etc/logrotate.d/test to have any of these extensions like /etc/logrotate.d/test.disabled.






            share|improve this answer













            If you look at the manual man logrotate.conf, you can read find tabooext option which enables you to exclude some files with specific extensions.



            tabooext [+] list
            The current taboo extension list is changed (see the include directive for information on the taboo extensions). If a + precedes the
            list of extensions, the current taboo extension list is augmented, otherwise it is replaced. At startup, the taboo extension list
            contains .rpmsave, .rpmorig, ~, .disabled, .dpkg-old, .dpkg-dist, .dpkg-new, .dpkg-bak, .dpkg-del, .cfsaved, .ucf-old, .ucf-dist,
            .ucf-new, .rpmnew, .swp, .cfsaved, .rhn-cfg-tmp-*


            You can choose one of the default excluded extensions like .disabled or you can specifiy your own additional extension like:



            tabooext + .test


            All you need to do is to rename your file /etc/logrotate.d/test to have any of these extensions like /etc/logrotate.d/test.disabled.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 4 '17 at 12:45









            KhaledKhaled

            31.3k65487




            31.3k65487













            • Yes, I read this, but I would like to keep the name as it is. I thought that maybe there is a line that I can add it in logrotate.conf in order to exclude "test" file... it seems there is not. Thanks!

              – Ioan
              Mar 4 '17 at 19:17








            • 1





              @Ioan: So, you want to exclude a file without doing any change!!

              – Khaled
              Mar 5 '17 at 8:08











            • I do want to do a change, but I thought that maybe there is a command that I can add in logrotate.conf. in order to exclude "test" . It seems there is not. Thank you.

              – Ioan
              Mar 5 '17 at 9:06





















            • Yes, I read this, but I would like to keep the name as it is. I thought that maybe there is a line that I can add it in logrotate.conf in order to exclude "test" file... it seems there is not. Thanks!

              – Ioan
              Mar 4 '17 at 19:17








            • 1





              @Ioan: So, you want to exclude a file without doing any change!!

              – Khaled
              Mar 5 '17 at 8:08











            • I do want to do a change, but I thought that maybe there is a command that I can add in logrotate.conf. in order to exclude "test" . It seems there is not. Thank you.

              – Ioan
              Mar 5 '17 at 9:06



















            Yes, I read this, but I would like to keep the name as it is. I thought that maybe there is a line that I can add it in logrotate.conf in order to exclude "test" file... it seems there is not. Thanks!

            – Ioan
            Mar 4 '17 at 19:17







            Yes, I read this, but I would like to keep the name as it is. I thought that maybe there is a line that I can add it in logrotate.conf in order to exclude "test" file... it seems there is not. Thanks!

            – Ioan
            Mar 4 '17 at 19:17






            1




            1





            @Ioan: So, you want to exclude a file without doing any change!!

            – Khaled
            Mar 5 '17 at 8:08





            @Ioan: So, you want to exclude a file without doing any change!!

            – Khaled
            Mar 5 '17 at 8:08













            I do want to do a change, but I thought that maybe there is a command that I can add in logrotate.conf. in order to exclude "test" . It seems there is not. Thank you.

            – Ioan
            Mar 5 '17 at 9:06







            I do want to do a change, but I thought that maybe there is a command that I can add in logrotate.conf. in order to exclude "test" . It seems there is not. Thank you.

            – Ioan
            Mar 5 '17 at 9:06













            0














            If you don't want to touch "test", you could try to modify the include /etc/logrotate.d directive in /etc/logrotate.conf. By default it refers to a directory and thus parses all files in that directory, except for some file extensions.



            What you can try is, modify the include directory to refer to individual files under /etc/logrotate.d, example /etc/logrotate.d/apt etc. You exclude "test" from that list. I haven't tested this, but it might be worth trying.






            share|improve this answer
























            • This could be a sollution. The problem is I am not the only one that is administrating this system and I am thinking that if someone is adding a file under /etc/logrotate.d/ will expect this to run. In conclusion, I don't want to touch any global setting. I didn't test it so far, but maybe I will create another directory under logrotate.d and put the file under this directory. As far as I understood, logrotate will not look after files under directories. Thanks!

              – Ioan
              Mar 4 '17 at 19:27
















            0














            If you don't want to touch "test", you could try to modify the include /etc/logrotate.d directive in /etc/logrotate.conf. By default it refers to a directory and thus parses all files in that directory, except for some file extensions.



            What you can try is, modify the include directory to refer to individual files under /etc/logrotate.d, example /etc/logrotate.d/apt etc. You exclude "test" from that list. I haven't tested this, but it might be worth trying.






            share|improve this answer
























            • This could be a sollution. The problem is I am not the only one that is administrating this system and I am thinking that if someone is adding a file under /etc/logrotate.d/ will expect this to run. In conclusion, I don't want to touch any global setting. I didn't test it so far, but maybe I will create another directory under logrotate.d and put the file under this directory. As far as I understood, logrotate will not look after files under directories. Thanks!

              – Ioan
              Mar 4 '17 at 19:27














            0












            0








            0







            If you don't want to touch "test", you could try to modify the include /etc/logrotate.d directive in /etc/logrotate.conf. By default it refers to a directory and thus parses all files in that directory, except for some file extensions.



            What you can try is, modify the include directory to refer to individual files under /etc/logrotate.d, example /etc/logrotate.d/apt etc. You exclude "test" from that list. I haven't tested this, but it might be worth trying.






            share|improve this answer













            If you don't want to touch "test", you could try to modify the include /etc/logrotate.d directive in /etc/logrotate.conf. By default it refers to a directory and thus parses all files in that directory, except for some file extensions.



            What you can try is, modify the include directory to refer to individual files under /etc/logrotate.d, example /etc/logrotate.d/apt etc. You exclude "test" from that list. I haven't tested this, but it might be worth trying.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 4 '17 at 14:33









            Daniel t.Daniel t.

            7,05312531




            7,05312531













            • This could be a sollution. The problem is I am not the only one that is administrating this system and I am thinking that if someone is adding a file under /etc/logrotate.d/ will expect this to run. In conclusion, I don't want to touch any global setting. I didn't test it so far, but maybe I will create another directory under logrotate.d and put the file under this directory. As far as I understood, logrotate will not look after files under directories. Thanks!

              – Ioan
              Mar 4 '17 at 19:27



















            • This could be a sollution. The problem is I am not the only one that is administrating this system and I am thinking that if someone is adding a file under /etc/logrotate.d/ will expect this to run. In conclusion, I don't want to touch any global setting. I didn't test it so far, but maybe I will create another directory under logrotate.d and put the file under this directory. As far as I understood, logrotate will not look after files under directories. Thanks!

              – Ioan
              Mar 4 '17 at 19:27

















            This could be a sollution. The problem is I am not the only one that is administrating this system and I am thinking that if someone is adding a file under /etc/logrotate.d/ will expect this to run. In conclusion, I don't want to touch any global setting. I didn't test it so far, but maybe I will create another directory under logrotate.d and put the file under this directory. As far as I understood, logrotate will not look after files under directories. Thanks!

            – Ioan
            Mar 4 '17 at 19:27





            This could be a sollution. The problem is I am not the only one that is administrating this system and I am thinking that if someone is adding a file under /etc/logrotate.d/ will expect this to run. In conclusion, I don't want to touch any global setting. I didn't test it so far, but maybe I will create another directory under logrotate.d and put the file under this directory. As far as I understood, logrotate will not look after files under directories. Thanks!

            – Ioan
            Mar 4 '17 at 19:27











            0














            You could edit the config file as below:



            before



            include /etc/logrotate.d


            after



            include /etc/logrotate.d/*.conf


            This should make only files ending .conf in /etc/logrotate.d/ to be picked up by logrotate excluding your test file



            If you already have files in /etc/logrotate.d/ being used by logrotate, these would need updated to include .conf






            share|improve this answer




























              0














              You could edit the config file as below:



              before



              include /etc/logrotate.d


              after



              include /etc/logrotate.d/*.conf


              This should make only files ending .conf in /etc/logrotate.d/ to be picked up by logrotate excluding your test file



              If you already have files in /etc/logrotate.d/ being used by logrotate, these would need updated to include .conf






              share|improve this answer


























                0












                0








                0







                You could edit the config file as below:



                before



                include /etc/logrotate.d


                after



                include /etc/logrotate.d/*.conf


                This should make only files ending .conf in /etc/logrotate.d/ to be picked up by logrotate excluding your test file



                If you already have files in /etc/logrotate.d/ being used by logrotate, these would need updated to include .conf






                share|improve this answer













                You could edit the config file as below:



                before



                include /etc/logrotate.d


                after



                include /etc/logrotate.d/*.conf


                This should make only files ending .conf in /etc/logrotate.d/ to be picked up by logrotate excluding your test file



                If you already have files in /etc/logrotate.d/ being used by logrotate, these would need updated to include .conf







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 5 '17 at 8:38









                KevKev

                112




                112






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Server Fault!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f836253%2fhow-to-exclude-a-service-under-etc-logrotate-d-to-run-with-the-main-logrotate%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

                    Список ссавців Італії Природоохоронні статуси | Список |...

                    Українські прізвища Зміст Історичні відомості |...