/var/log

Envoyé par
sbx59
Car j'ai 600Go de donnée derrière ...
Ça, c'est bonne bonne raison de faire une sauvegarde.
Car sur un KS, le disque dur ... la question n'est pas SI il va mourir, mais plutôt: QUAND.
Si t'as envie de jouer ce roulette russe (avec 5 balles dans le chargeur de 6), ok, pourquoi pas, mais sauvegarde au moins le répertoire /etc (100 Ko à peine) et tous ce qui est vraiment indispensable pour remettre en marche ton serveur.
Je te rappelle que KS(OVH) change ton disque dur pour une tout neuf, tout vide - il n'y aura même pas d'OS.
De plus, avec un admin dans le secteur qui supprime un répertoire important genre /var/log la raison pour faire des sauvegarde est doublé.
T'inquiète, on a tous bousillé des données important - ça nous arrive qu'une fois.

Envoyé par
janus57
Bonjour,
sinon pourquoi ne pas faire un backup et repartir sur une base saine ?
On apprend de nos erreurs et après on fait attention (surtout avec rm -R).
Cordialement, janus57
Car j'ai 600Go de donnée derrière ...
Bonjour,
sinon pourquoi ne pas faire un backup et repartir sur une base saine ?
On apprend de nos erreurs et après on fait attention (surtout avec rm -R).
Cordialement, janus57
Debian 7.5 (Wheezy) (Oldstable) (64bits)
dans le manager du dédié, tu dois voir quelle distribution est installée
Hum ou je peut le voir ? car moi quand j'avais séléctionner a l'installation c'étais debian ... :/
Ensuite je crée les fichier avec la commande "touch" ?
faut regarder l'intérieur de chaque fichier de configuration pôur avoir tous les noms des fichiers
cat /etc/logrotate.d/apache2
c'est quoi cette distribution ? Une release 3 ?
Parce que ce que je t'ai donné c'est Debian et là je vois de yum donc Centos
Voici le résultat
ls -l /etc/logrotate.d/
total 52
-rw-r--r-- 1 root root 326 mars 4 2013 apache2
-rw-r--r-- 1 root root 173 août 6 2012 apt
-rw-r--r-- 1 root root 79 août 28 2012 aptitude
-rw-r--r-- 1 root root 135 juil. 30 2012 consolekit
-rw-r--r-- 1 root root 232 juil. 21 2012 dpkg
-rw-r--r-- 1 root root 338 juin 12 2013 fail2ban
-rw-r--r-- 1 root root 880 déc. 14 2013 mysql-server
-rw-r--r-- 1 root root 157 janv. 16 2012 pm-utils
-rw-r--r-- 1 root root 94 juin 22 2012 ppp
-rw-r--r-- 1 root root 215 oct. 27 2013 roundcube-core
-rw-r--r-- 1 root root 515 juin 9 2012 rsyslog
-rw-r--r-- 1 root root 513 déc. 7 2012 speech-dispatcher
-rw-r--r-- 1 root root 100 juin 27 2012 yum
ls -l /etc/logrotate.d/
tu auras tous les configurations, donc tous les noms
-rw-r--r-- 1 root root 3152 May 22 18:49 /var/log/alternatives.log
-rw-r----- 1 root adm 2524563 May 28 12:20 /var/log/auth.log
-rw-r----- 1 root adm 139408 May 28 11:15 /var/log/daemon.log
-rw-r--r-- 1 root root 11059 May 22 18:49 /var/log/dpkg.log
-rw-r----- 1 root adm 103295 May 28 11:15 /var/log/fail2ban.log
-rw-r--r-- 1 root root 3712 Jun 3 2014 /var/log/faillog
-rw-r--r-- 1 root root 1 May 14 2014 /var/log/fontconfig.log
-rw-r----- 1 root adm 0 Feb 12 05:25 /var/log/kern.log
-rw-rw-r-- 1 root utmp 33872 May 28 12:20 /var/log/lastlog
-rw-r----- 1 root adm 0 Jun 8 2014 /var/log/lpr.log
-rw-r----- 1 root adm 747880 May 28 11:15 /var/log/mail.log
-rw-r----- 1 mysql adm 0 May 28 05:25 /var/log/mysql.log
-rw-r--r-- 1 root root 0 May 28 05:25 /var/log/procmail.log
-rw-r--r-- 1 root root 0 Jun 4 2014 /var/log/pycentral.log
-rw-r----- 1 root adm 33321 May 28 12:20 /var/log/syslog
-rw-r----- 1 root adm 0 Jun 8 2014 /var/log/user.log
Merci, mais je ne connais pas logrotate, peut tu me dire avec qu'elle commande le lancer .
Utilisation: logrotate [-dfv?] [-d|--debug] [-f|--force] [-m|--mail=command]
[-s|--state=statefile] [-v|--verbose] [-?|--help] [--usage]
[OPTION...]
logrotate -f /etc/logrotate.conf
[Thu May 28 13:30:28 2015] [warn] The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf.save at line 3 will probably never match because it overlaps an earlier Alias.
Warning: DocumentRoot [/var/www/mail] does not exist
error: skipping "/var/log/aptitude" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/ConsoleKit/history" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/dpkg.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/alternatives.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/fail2ban.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/mysql.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/pm-suspend.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/pm-powersave.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/ppp-connect-errors" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/syslog" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/mail.info" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/mail.warn" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/mail.err" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/mail.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/daemon.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/kern.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/auth.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/user.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/lpr.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/cron.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/debug" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/messages" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/yum.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/wtmp" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
error: skipping "/var/log/btmp" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
Je crée donc tout les dossiers et fichiers ?
essaies déjà de juste recréer les dossiers puis lancer logrotate, si cela ne les recrée pas je te les donnerais, si tu utilises virtualmin il y a aussi une répertoire
drwx--x--x 2 root root virtualmin
Merci BBR.
Il suffit juste de recrée les sous dossier et les fichier log vons retrouver leurs petit ?
Aussi il y avais un fichier de log pour les erreur 404 ... je ne c'est plus dans quel dossier c'étais
Il y avais aussi des dossier a la racine de /var/log Peut tu me les donner ?
droits proprio groupe nom_rep
drwxr-x--- 2 root adm apache2
drwxr-xr-x 2 root root apt
drwxr-xr-x 2 clamav clamav clamav
drwxr-xr-x 2 root root fsck
drwxr-s--- 2 mysql adm mysql
drwxr-xr-x 2 root root news
drwxrwxr-t 2 root postgres postgresql
drwxr-xr-x 2 root root proftpd
drwxr-xr-x 2 root root upstart
tu forces la rotation, ça devrait recréer les fichiers
logrotate -f /etc/logrotate.conf
Debian GNU/Linux 7.8
Pourrais tu me lister les sous dossiers a recrée ? je ne les connais pas :/
Bonjour,
si pas de sauvegarde faut sans doute le re-créer à la main et re-créer tout les sous-dossiers.
Quel OS ?
Cordialement, janus57
Bonjour,
Sans faire expré j'ai supprimer le dossier complet LOG ! alors que je ne voulais supprimer que quelque fichier. Je me suis dit je vais attendre, et le dossier log va se recrée mais non ...
Pouvez vous m'aider a retrouver un dossier log, avec toutes les connexion, les bug .. ?
merci de votre aide.