Analyse Logging commands for debian linux
Sep 23
http://stackoverflow.com/questions/473998/tool-or-language-to-count-occurrances-of-errors-in-a-log-file
Sep 23
http://stackoverflow.com/questions/473998/tool-or-language-to-count-occurrances-of-errors-in-a-log-file
Feb 02
We will create a self-signed Certificate !
In Dovecot postfix SSL.
Default for Virtualmin in DEBIAN 5
error – logging
1 2 3 | egrep '(warning|error|fatal|panic):' /var/log/mail.log | more Jan 30 05:27:02 Debian-50-lenny-64-minimal dovecot: pop3-login: Can't load private key file /etc/ssl/private/dovecot.pem: error:0B080074:x509 certificate routines:X509_ |
Jun 10
rm -r /var/log/apache2
rm -r /var/cache/eaccelerator
rm -r /root/Maildir
rm -r /home/internetfastnews/Maildir
rm -r /home/zxnews/Maildir
rm -r /home/seoch/Maildir
rm -r /home/otvetish/Maildir
rm -r /home/teaseo/Maildir
rm -r /home/school/Maildir
Jan 12
Secure server backup logic
1) find all buckup files *.gz
2) encode them to *.gz.out
3) remove gz file
4) upload to ftp
5) remove encoded file
Secure server backup script
1 2 3 4 5 6 7 8 9 10 11 | #!/bin/sh
BACKUPDATE=`date +%Y-%m-%d`;
find . -type f -name "*.gz" -print|while read myfile
do
openssl enc -aes-256-cbc -salt -in "$myfile" -out "$myfile".out -pass pass:PaSSwordThere;
rm "$myfile" ;
curl -v -T "$myfile".out ftp://login:"FTppassThere"@ftpserveraddres.com/${BACKUPDATE}/"$myfile" -Q "MKD ${BACKUPDATE}";
curl -v -T "$myfile".out ftp://login:"FTppassThere"@ftpserveraddres.com/${BACKUPDATE}/"$myfile" ;
rm "$myfile".out ;
echo "$myfile" "\n" ;
done |
This is my first backup script!
Also decode example
openssl enc -d -aes-256-cbc -in zzzz.gz.out -out zzzz.gz -pass pass:PaSSwordThere;