« Linux : Logrotate » : différence entre les versions

De www.yakakliker.org
(Page créée avec «  === Exemple de paramètres logrotate === <syntaxhighlight lang="bash"> /var/log/unattended-upgrades/unattended-upgrades.log /var/log/unattended-upgrades/unattended-upgrades-dpkg.log /var/log/unattended-upgrades/unattended-upgrades-shutdown.log { rotate 6 monthly compress missingok notifempty } </syntaxhighlight> Catégorie:Logrotate Catégorie:Linux »)
 
Aucun résumé des modifications
 
(Une version intermédiaire par le même utilisateur non affichée)
Ligne 12 : Ligne 12 :
   notifempty
   notifempty
}
}
</syntaxhighlight>
{| class="wikitable"
!Besoin
!Commande
|-
|Tester la config sans rien changer
|<code>sudo logrotate -d /etc/logrotate.conf</code>
|-
|Forcer une rotation maintenant
|<code>sudo logrotate -f /etc/logrotate.conf</code>
|-
|Ne traiter qu'un fichier
|<code>sudo logrotate -f /etc/logrotate.d/monapp</code>
|}
<syntaxhighlight lang="bash">
sudo systemctl restart logrotate.timer  # relance le minuteur (pas de daemon)
sudo systemctl start logrotate.service  # force une exécution immédiate
</syntaxhighlight>
</syntaxhighlight>
[[Catégorie:Logrotate]]
[[Catégorie:Logrotate]]
[[Catégorie:Linux]]
[[Catégorie:Linux]]
‎<html>
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a>
‎</html>
‎ <html>
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
  kofiWidgetOverlay.draw('yakakliker', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Café',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
‎</html>

Dernière version du 29 septembre 2026 à 14:46

Exemple de paramètres logrotate

/var/log/unattended-upgrades/unattended-upgrades.log 
/var/log/unattended-upgrades/unattended-upgrades-dpkg.log
/var/log/unattended-upgrades/unattended-upgrades-shutdown.log
{
  rotate 6
  monthly
  compress
  missingok
  notifempty
}
Besoin Commande
Tester la config sans rien changer sudo logrotate -d /etc/logrotate.conf
Forcer une rotation maintenant sudo logrotate -f /etc/logrotate.conf
Ne traiter qu'un fichier sudo logrotate -f /etc/logrotate.d/monapp
sudo systemctl restart logrotate.timer   # relance le minuteur (pas de daemon)
sudo systemctl start logrotate.service   # force une exécution immédiate


‎ compteur web gratuit sans pub ‎

‎ ‎