{"id":432,"date":"2024-05-15T14:56:00","date_gmt":"2024-05-15T11:56:00","guid":{"rendered":"https:\/\/hosting.in.ua\/blog\/?p=432"},"modified":"2025-10-15T15:14:08","modified_gmt":"2025-10-15T12:14:08","slug":"logrotate-capabilities-for-managing-logs-on-linux-systems","status":"publish","type":"post","link":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/","title":{"rendered":"LogRotate capabilities for managing logs on Linux systems"},"content":{"rendered":" <p class=\"wp-block-paragraph\">Launching any program or process in a <strong>Linux<\/strong> environment is accompanied by the creation of a log to record all changes related to their operation. <strong>Logs<\/strong> are entries made in these journals. This information is used by the server to organize its work and serves as a starting point for identifying possible system failures.<\/p>   <p class=\"wp-block-paragraph\">However, over time, log files increase in size, so they require maintenance. <strong>LogRotate<\/strong> is part of the basic Linux system software and is designed to perform these functions. Let\u2019s take a closer look at how it works.<\/p>   <h2 class=\"wp-block-heading\">Log management mechanism in Linux-like systems<\/h2>   <p class=\"wp-block-paragraph\">The <strong>LogRotate<\/strong> program works automatically and generally doesn\u2019t require configuration. However, for greater flexibility in log management and convenience for the system administrator, it still needs to be adjusted according to specific requirements.<\/p>   <p class=\"wp-block-paragraph\">For this purpose, several levels of control have been provided by developers, which we\u2019ll review below. But first, let\u2019s outline the sequence of operations that ensure proper log maintenance and management.<\/p>   <p class=\"wp-block-paragraph\">Log system maintenance consists of adding new entries to the logs and ensuring their automatic rotation. The sequence of actions is approximately as follows:<\/p>   <ul class=\"wp-block-list\"> <li>creating an empty log immediately after initializing a new process;<\/li>   <li>adding entries to the log whenever an event occurs related to the running process;<\/li>   <li>archiving the log file once it becomes full;<\/li>   <li>placing the created archive in a predefined directory.<\/li> <\/ul>   <p class=\"wp-block-paragraph\">As mentioned earlier, LogRotate settings can be managed at several levels. Their priority corresponds to the reverse order in the list below. These levels include:<\/p>   <ul class=\"wp-block-list\"> <li>system level;<\/li>   <li>individual process level;<\/li>   <li>user level.<\/li> <\/ul>   <p class=\"wp-block-paragraph\"><strong>System level.<\/strong><br>The basic level defines the main operations that the program performs for any process \u2014 log creation, archiving, moving, etc. Settings are stored in the <code>logrotate.conf<\/code> configuration file.<\/p>   <p class=\"wp-block-paragraph\"><strong>Individual process level.<\/strong><br>This level allows managing the program\u2019s behavior for any running process \u2014 both system and user-level ones. It is implemented through configuration files stored for each process in the system directory <code>logrotate.d<\/code>.<\/p>   <p class=\"wp-block-paragraph\"><strong>User level.<\/strong><br>This allows custom settings for each user individually. In this case, the <strong>LogRotate<\/strong> configuration file and log files are located in the user\u2019s home directory. These settings have the highest priority and override any default values specified in the system configuration file.<\/p>   <p class=\"wp-block-paragraph\">Below are examples of configuration changes for each of these levels.<\/p>   <h2 class=\"wp-block-heading\">System-level LogRotate configuration<\/h2>   <p class=\"wp-block-paragraph\">We\u2019ll use a server running <strong>Ubuntu 22.04<\/strong>.<br>First, let\u2019s find out which version of the program is installed in the system. To do this, enter the following command in the terminal:<\/p>   <pre class=\"wp-block-preformatted\">$ logrotate --version<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"181\" src=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image001-1.png\" alt=\"\" class=\"wp-image-416\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image001-1.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image001-1-300x53.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image001-1-768x136.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">As we can see, version <strong>3.19.0<\/strong> is installed.<\/p>   <p class=\"wp-block-paragraph\">Next, let\u2019s view the contents of the main configuration file using the command:<\/p>   <pre class=\"wp-block-preformatted\">$ nano \/etc\/logrotate.conf<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"476\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image003-1.png\" alt=\"\" class=\"wp-image-417\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image003-1.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image003-1-300x140.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image003-1-768x358.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">The general operations and settings for managing logs of all processes running in the system look like this:<\/p>   <pre class=\"wp-block-preformatted\">weekly<br>su root adm<br>rotate 4<br>create<br>include \/etc\/logrotate.d<\/pre>   <p class=\"wp-block-paragraph\">Here:<\/p>   <ul class=\"wp-block-list\"> <li><strong>weekly<\/strong> \u2014 runs the program once a week;<\/li>   <li><strong>su root adm<\/strong> \u2014 sets the default administrative group;<\/li>   <li><strong>rotate 4<\/strong> \u2014 maximum number of old log files to keep;<\/li>   <li><strong>create<\/strong> \u2014 creates new log files;<\/li>   <li><strong>include \/etc\/logrotate.d<\/strong> \u2014 specifies the directory path containing configuration files for individual processes.<\/li> <\/ul>   <p class=\"wp-block-paragraph\">If necessary, these parameters can be modified directly in this file, but such changes will affect <strong>all<\/strong> processes, so it\u2019s usually better to use other configuration levels.<\/p> \n <h2 class=\"wp-block-heading\">Process-level log management<\/h2>   <p class=\"wp-block-paragraph\">This level allows for more flexible configuration of the program for each process individually.<\/p>   <p class=\"wp-block-paragraph\">Let\u2019s view the contents of the system directory <code>logrotate.d<\/code>, which stores configuration files (their names correspond to process names):<\/p>   <pre class=\"wp-block-preformatted\">$ ls -l \/etc\/logrotate.d<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"245\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image005-1.png\" alt=\"\" class=\"wp-image-418\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image005-1.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image005-1-300x72.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image005-1-768x184.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">For example, the configuration file for the error reporting service <strong>apport<\/strong> has the same name.<\/p>   <p class=\"wp-block-paragraph\">Let\u2019s view its contents:<\/p>   <pre class=\"wp-block-preformatted\">$ cat \/etc\/logrotate.d\/apport<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"180\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image007.png\" alt=\"\" class=\"wp-image-419\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image007.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image007-300x53.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image007-768x136.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">We get the following result:<\/p>   <pre class=\"wp-block-preformatted\">daily<br>rotate 7<br>delaycompress<br>compress<br>notifempty<br>missingok<\/pre>   <p class=\"wp-block-paragraph\">Parameter explanations:<\/p>   <ul class=\"wp-block-list\"> <li><strong>daily<\/strong> \u2014 runs the program daily;<\/li>   <li><strong>compress<\/strong> \u2014 compresses the log file;<\/li>   <li><strong>delaycompress<\/strong> \u2014 delays compression until the next rotation;<\/li>   <li><strong>notifempty<\/strong> \u2014 prevents rotation if the log file is empty;<\/li>   <li><strong>missingok<\/strong> \u2014 ignores missing log files without showing an error.<\/li> <\/ul>   <p class=\"wp-block-paragraph\">Log storage location for <strong>apport<\/strong>:<br><code>\/var\/log\/apport.log<\/code>.<\/p>   <p class=\"wp-block-paragraph\">Let\u2019s create our own configuration file for a custom process called <strong>user-proc<\/strong>:<\/p>   <pre class=\"wp-block-preformatted\">$ nano \/etc\/logrotate.d\/user-proc<\/pre>   <p class=\"wp-block-paragraph\">Add the following code:<\/p>   <pre class=\"wp-block-preformatted\">\/var\/log\/user-proc\/*.log {<br><br> weekly<br> rotate 5<br> compress<br> create<br> missingok<br> notifempty<br> sharedscripts<br> <br> postrotate<br> systemctl reload user-proc<br> endscript<br><br>}<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"294\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image009.png\" alt=\"\" class=\"wp-image-420\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image009.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image009-300x86.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image009-768x221.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">Explanation of new parameters:<\/p>   <ul class=\"wp-block-list\"> <li><strong>sharedscripts<\/strong> \u2014 allows shared scripts to run once for all logs;<\/li>   <li><strong>postrotate<\/strong> \u2014 defines a script to run after rotation;<br>in this case, it reloads the <strong>user-proc<\/strong> process.<\/li> <\/ul>   <p class=\"wp-block-paragraph\">Create a directory for this process\u2019s logs:<\/p>   <pre class=\"wp-block-preformatted\">$ mkdir \/var\/log\/user-proc<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"37\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image011.png\" alt=\"\" class=\"wp-image-421\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image011.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image011-300x11.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image011-768x28.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">Check the configuration in debug mode:<\/p>   <pre class=\"wp-block-preformatted\">$ sudo logrotate \/etc\/logrotate.conf --debug<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"520\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image013-1.png\" alt=\"\" class=\"wp-image-422\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image013-1.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image013-1-300x153.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image013-1-768x392.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"708\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image015.png\" alt=\"\" class=\"wp-image-423\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image015.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image015-300x208.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image015-768x533.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">Among the results, you\u2019ll see lines like:<\/p>   <pre class=\"wp-block-preformatted\">rotating pattern: \/var\/log\/user-proc\/*.log weekly (5 rotations)<br>empty log files are not rotated, old logs are removed<\/pre>   <p class=\"wp-block-paragraph\">This means that the <strong>user-proc<\/strong> configuration has been successfully created.<\/p>   <h2 class=\"wp-block-heading\">User-level log management<\/h2>   <p class=\"wp-block-paragraph\">First, let\u2019s create a user for whom we\u2019ll configure logging:<\/p>   <pre class=\"wp-block-preformatted\">$ sudo useradd -m -s \/bin\/bash -c \"Admin User Ubuntu\" userubuntu<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"37\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image017.png\" alt=\"\" class=\"wp-image-424\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image017.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image017-300x11.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image017-768x28.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">Here:<\/p>   <ul class=\"wp-block-list\"> <li><strong>userubuntu<\/strong> \u2014 the new user\u2019s name;<\/li>   <li><strong>-m<\/strong> \u2014 creates a home directory;<\/li>   <li><strong>-s<\/strong> \u2014 specifies the shell;<\/li>   <li><strong>-c<\/strong> \u2014 adds a comment.<\/li> <\/ul>   <p class=\"wp-block-paragraph\">Create the configuration file:<\/p>   <pre class=\"wp-block-preformatted\">$ nano \/home\/userubuntu\/logrotate.conf<\/pre>   <p class=\"wp-block-paragraph\">Add the following lines:<\/p>   <pre class=\"wp-block-preformatted\">\/home\/userubuntu\/logs\/*.log {<br> <br> daily<br> rotate 12<br> missingok<br> create<br> compress<br>}<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"192\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image019.png\" alt=\"\" class=\"wp-image-425\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image019.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image019-300x56.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image019-768x145.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">Now let\u2019s create a directory for logs and a log file:<\/p>   <pre class=\"wp-block-preformatted\">$ mkdir \/home\/userubuntu\/logs<br>$ echo > \/home\/userubuntu\/logs\/access.log<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"53\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image021.png\" alt=\"\" class=\"wp-image-426\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image021.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image021-300x16.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image021-768x40.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">Check if the configuration works properly:<\/p>   <pre class=\"wp-block-preformatted\">$ logrotate \/home\/userubuntu\/logrotate.conf --state \/home\/userubuntu\/logrotate-state --verbose<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"244\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image023.png\" alt=\"\" class=\"wp-image-427\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image023.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image023-300x72.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image023-768x184.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">The output will include:<\/p>   <pre class=\"wp-block-preformatted\">rotating pattern: \/home\/userubuntu\/logs\/*.log after 1 days (12 rotations)<br>empty log files are rotated, old logs are removed<br>considering log \/home\/userubuntu\/logs\/access.log<br>Now: 2023-09-21 09:59<br>Last rotated at 2023-09-21 09:00<br>log does not need rotating (log has already been rotated)<\/pre>   <p class=\"wp-block-paragraph\">Let\u2019s check the state file:<\/p>   <pre class=\"wp-block-preformatted\">$ nano \/home\/userubuntu\/logrotate-state<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"67\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image025.png\" alt=\"\" class=\"wp-image-428\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image025.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image025-300x20.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image025-768x50.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">It records the date and time of the process execution:<br><code>2023-9-21-9:0:0<\/code>.<\/p>   <p class=\"wp-block-paragraph\">Let\u2019s configure automatic execution of the program every hour using the <strong>cron<\/strong> scheduler:<\/p>   <pre class=\"wp-block-preformatted\">$ crontab -e<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"181\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image027.png\" alt=\"\" class=\"wp-image-429\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image027.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image027-300x53.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image027-768x136.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">Add the following line:<\/p>   <pre class=\"wp-block-preformatted\">30 * * * * \/usr\/sbin\/logrotate \/home\/userubuntu\/logrotate.conf --state \/home\/userubuntu\/logrotate-state<\/pre>   <figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"433\" src=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image029.png\" alt=\"\" class=\"wp-image-430\" srcset=\"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image029.png 1020w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image029-300x127.png 300w, https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/image029-768x326.png 768w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/figure>   <p class=\"wp-block-paragraph\">After saving the changes, LogRotate will run <strong>at the 30th minute of every hour<\/strong>, around the clock.<\/p> ","protected":false},"excerpt":{"rendered":"<p>Managing logs with program LogRotate on Linux systems. Configuring and tracking records at multiple levels.<\/p>\n","protected":false},"author":2,"featured_media":415,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[28],"tags":[],"class_list":["post-432","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-configuration"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LogRotate capabilities for managing logs on Linux systems - \u0411\u043b\u043e\u0433 Hosting in Ukraine<\/title>\n<meta name=\"description\" content=\"Managing logs with program LogRotate on Linux systems. Configuring and tracking records at multiple levels.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/\" \/>\n<meta property=\"og:locale\" content=\"uk_UA\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LogRotate capabilities for managing logs on Linux systems - \u0411\u043b\u043e\u0433 Hosting in Ukraine\" \/>\n<meta property=\"og:description\" content=\"Managing logs with program LogRotate on Linux systems. Configuring and tracking records at multiple levels.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0411\u043b\u043e\u0433 Hosting in Ukraine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hostinginua\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-15T11:56:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-15T12:14:08+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/untitled_01.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1333\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tetiana Volkivska\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@HostingInUA\" \/>\n<meta name=\"twitter:site\" content=\"@HostingInUA\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tetiana Volkivska\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u0431\u043b. \u0447\u0430\u0441 \u0447\u0438\u0442\u0430\u043d\u043d\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u0445\u0432\u0438\u043b\u0438\u043d\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/\"},\"author\":{\"name\":\"Tetiana Volkivska\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#\\\/schema\\\/person\\\/7c7764e13cddfc79e79adefcf854a9d2\"},\"headline\":\"LogRotate capabilities for managing logs on Linux systems\",\"datePublished\":\"2024-05-15T11:56:00+00:00\",\"dateModified\":\"2025-10-15T12:14:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/\"},\"wordCount\":831,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/untitled_01.jpeg\",\"articleSection\":[\"Software configuration\"],\"inLanguage\":\"uk\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/\",\"name\":\"LogRotate capabilities for managing logs on Linux systems - \u0411\u043b\u043e\u0433 Hosting in Ukraine\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/untitled_01.jpeg\",\"datePublished\":\"2024-05-15T11:56:00+00:00\",\"dateModified\":\"2025-10-15T12:14:08+00:00\",\"description\":\"Managing logs with program LogRotate on Linux systems. Configuring and tracking records at multiple levels.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/#breadcrumb\"},\"inLanguage\":\"uk\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"uk\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/untitled_01.jpeg\",\"contentUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/untitled_01.jpeg\",\"width\":2000,\"height\":1333},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/software-configuration\\\/logrotate-capabilities-for-managing-logs-on-linux-systems\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0411\u043b\u043e\u0433\",\"item\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Software configuration\",\"item\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/en\\\/category\\\/software-configuration\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"LogRotate capabilities for managing logs on Linux systems\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/\",\"name\":\"Blog Hosting in Ukraine\",\"description\":\"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433, \u0434\u043e\u043c\u0435\u043d\u0438 \u0442\u0430 \u0441\u0430\u0439\u0442\u0438\",\"publisher\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"uk\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#organization\",\"name\":\"Blog Hosting in Ukraine\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"uk\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/black_logo.png\",\"contentUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/black_logo.png\",\"width\":136,\"height\":30,\"caption\":\"Blog Hosting in Ukraine\"},\"image\":{\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hostinginua\",\"https:\\\/\\\/x.com\\\/HostingInUA\",\"https:\\\/\\\/www.instagram.com\\\/hosting.in.ua\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/hostinginukraine\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/#\\\/schema\\\/person\\\/7c7764e13cddfc79e79adefcf854a9d2\",\"name\":\"Tetiana Volkivska\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"uk\",\"@id\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621\",\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621\",\"contentUrl\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621\",\"caption\":\"Tetiana Volkivska\"},\"sameAs\":[\"http:\\\/\\\/hosting.in.ua\"],\"url\":\"https:\\\/\\\/hosting.in.ua\\\/blog\\\/author\\\/tasha\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LogRotate capabilities for managing logs on Linux systems - \u0411\u043b\u043e\u0433 Hosting in Ukraine","description":"Managing logs with program LogRotate on Linux systems. Configuring and tracking records at multiple levels.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/","og_locale":"uk_UA","og_type":"article","og_title":"LogRotate capabilities for managing logs on Linux systems - \u0411\u043b\u043e\u0433 Hosting in Ukraine","og_description":"Managing logs with program LogRotate on Linux systems. Configuring and tracking records at multiple levels.","og_url":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/","og_site_name":"\u0411\u043b\u043e\u0433 Hosting in Ukraine","article_publisher":"https:\/\/www.facebook.com\/hostinginua","article_published_time":"2024-05-15T11:56:00+00:00","article_modified_time":"2025-10-15T12:14:08+00:00","og_image":[{"width":2000,"height":1333,"url":"http:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/untitled_01.jpeg","type":"image\/jpeg"}],"author":"Tetiana Volkivska","twitter_card":"summary_large_image","twitter_creator":"@HostingInUA","twitter_site":"@HostingInUA","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e":"Tetiana Volkivska","\u041f\u0440\u0438\u0431\u043b. \u0447\u0430\u0441 \u0447\u0438\u0442\u0430\u043d\u043d\u044f":"8 \u0445\u0432\u0438\u043b\u0438\u043d"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/#article","isPartOf":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/"},"author":{"name":"Tetiana Volkivska","@id":"https:\/\/hosting.in.ua\/blog\/#\/schema\/person\/7c7764e13cddfc79e79adefcf854a9d2"},"headline":"LogRotate capabilities for managing logs on Linux systems","datePublished":"2024-05-15T11:56:00+00:00","dateModified":"2025-10-15T12:14:08+00:00","mainEntityOfPage":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/"},"wordCount":831,"commentCount":0,"publisher":{"@id":"https:\/\/hosting.in.ua\/blog\/#organization"},"image":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/#primaryimage"},"thumbnailUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/untitled_01.jpeg","articleSection":["Software configuration"],"inLanguage":"uk","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/","url":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/","name":"LogRotate capabilities for managing logs on Linux systems - \u0411\u043b\u043e\u0433 Hosting in Ukraine","isPartOf":{"@id":"https:\/\/hosting.in.ua\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/#primaryimage"},"image":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/#primaryimage"},"thumbnailUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/untitled_01.jpeg","datePublished":"2024-05-15T11:56:00+00:00","dateModified":"2025-10-15T12:14:08+00:00","description":"Managing logs with program LogRotate on Linux systems. Configuring and tracking records at multiple levels.","breadcrumb":{"@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/#breadcrumb"},"inLanguage":"uk","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/"]}]},{"@type":"ImageObject","inLanguage":"uk","@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/#primaryimage","url":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/untitled_01.jpeg","contentUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/untitled_01.jpeg","width":2000,"height":1333},{"@type":"BreadcrumbList","@id":"https:\/\/hosting.in.ua\/blog\/en\/software-configuration\/logrotate-capabilities-for-managing-logs-on-linux-systems\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0411\u043b\u043e\u0433","item":"https:\/\/hosting.in.ua\/blog\/"},{"@type":"ListItem","position":2,"name":"Software configuration","item":"https:\/\/hosting.in.ua\/blog\/en\/category\/software-configuration\/"},{"@type":"ListItem","position":3,"name":"LogRotate capabilities for managing logs on Linux systems"}]},{"@type":"WebSite","@id":"https:\/\/hosting.in.ua\/blog\/#website","url":"https:\/\/hosting.in.ua\/blog\/","name":"Blog Hosting in Ukraine","description":"\u0411\u043b\u043e\u0433 \u043f\u0440\u043e \u0445\u043e\u0441\u0442\u0438\u043d\u0433, \u0434\u043e\u043c\u0435\u043d\u0438 \u0442\u0430 \u0441\u0430\u0439\u0442\u0438","publisher":{"@id":"https:\/\/hosting.in.ua\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hosting.in.ua\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"uk"},{"@type":"Organization","@id":"https:\/\/hosting.in.ua\/blog\/#organization","name":"Blog Hosting in Ukraine","url":"https:\/\/hosting.in.ua\/blog\/","logo":{"@type":"ImageObject","inLanguage":"uk","@id":"https:\/\/hosting.in.ua\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/black_logo.png","contentUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/uploads\/2025\/10\/black_logo.png","width":136,"height":30,"caption":"Blog Hosting in Ukraine"},"image":{"@id":"https:\/\/hosting.in.ua\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hostinginua","https:\/\/x.com\/HostingInUA","https:\/\/www.instagram.com\/hosting.in.ua\/","https:\/\/www.linkedin.com\/company\/hostinginukraine\/"]},{"@type":"Person","@id":"https:\/\/hosting.in.ua\/blog\/#\/schema\/person\/7c7764e13cddfc79e79adefcf854a9d2","name":"Tetiana Volkivska","image":{"@type":"ImageObject","inLanguage":"uk","@id":"https:\/\/hosting.in.ua\/blog\/wp-content\/litespeed\/avatar\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621","url":"https:\/\/hosting.in.ua\/blog\/wp-content\/litespeed\/avatar\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621","contentUrl":"https:\/\/hosting.in.ua\/blog\/wp-content\/litespeed\/avatar\/ed62fb20806785c1f4f6c2d01a8b9ab4.jpg?ver=1792756621","caption":"Tetiana Volkivska"},"sameAs":["http:\/\/hosting.in.ua"],"url":"https:\/\/hosting.in.ua\/blog\/author\/tasha\/"}]}},"_links":{"self":[{"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/posts\/432","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/comments?post=432"}],"version-history":[{"count":1,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/posts\/432\/revisions"}],"predecessor-version":[{"id":433,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/posts\/432\/revisions\/433"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/media\/415"}],"wp:attachment":[{"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/media?parent=432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/categories?post=432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hosting.in.ua\/blog\/wp-json\/wp\/v2\/tags?post=432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}