Manually backup databases managed by plesk for linux

 Wrote a quick little script to get all the mysql database names managed by Plesk for linux and then manually back them up.

#!/bin/bash

MYSQLPASS=`cat /etc/psa/.psa.shadow`
# Day of week
DAY=`date +%u`
DIR=”/mnt/backup/mysql”

# Backup mysql database
mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` -c -e –add-drop-table –add-locks –allow-keywords mysql > $DIR/mysql.$DAY.sql

for DB in `mysql -Ns -uadmin -p$MYSQLPASS -Dpsa -e “select name from data_bases”`;
do mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` -c -e –add-drop-table –add-locks –allow-keywords $DB > $DIR/$DB.$DAY.sql;
done

Testing SMTP AUTH

Great link to information regarding testing SMTP AUTH:

To test SMTP AUTH I did the following:

[server]# perl -MMIME::Base64 -e ‘print encode_base64(“\000test\@domain.com\000testpassword”)’
AHRlc3RAZG9tYWluLmNvbQB0ZXN0cGFzc3dvcmQ=

[server]# perl -MMIME::Base64 -e ‘print decode_base64(“AHRlc3RAZG9tYWluLmNvbQB0ZXN0cGFzc3dvcmQ=”)’
[email protected]

Then connect to the server and try putting in the above SMTP AUTH details:

[server]# telnet localhost 25
Trying 127.0.0.1…
Connected to localhost (127.0.0.1).
Escape character is ‘^]’.
220 localhost ESMTP
ehlo testing
250-localhost
250-STARTTLS
250-PIPELINING
250 8BITMIME
AUTH PLAIN AHRlc3RAZG9tYWluLmNvbQB0ZXN0cGFzc3dvcmQ=
235 go ahead
quit
221 localhost

URLs: