MySQL Database backup and use the file as attachment mail to an mail address
This Program IS a little tool for mysql database backup ande mail to some address,
Add Automatic delete old backup files. please edit it in config.php
The max backup numbers perfer to set 0. in case of some one to download db files;
use PHPMailer and MySQL-dump to compose.
lisence obey BSD-3-Clause License and LGPL-2.1 License
It is very easy to use
1.Clone the source code to local
2.Install PHPMailercomposer install
3.Edit the config.php
change it for your own's db information.
and next change the smtp server information.
You can decide to enable or disable the mail deliver function.
//DB information
$db_host = "localhost";
$db_user_name = "root";
$db_user_pass = "root";
$db_name = "test";
//access key
$key = "mooncn.win";
//SMTP Server Information
$mail_deliver = true; //Default Enable The Mail Deliver data function.
$smtp_host = "smtp.sample.com";// Set the SMTP server to send through
$smtp_auth = true;//true or false Enable SMTP authentication
$smtp_username = "username@sample.com";// SMTP username
$smtp_password = "password";// SMTP password
$smtp_port = "465";// TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above
//max server space backup files nums.
$max_backup = 3;
Then set a time job .
access the file http://sample.com/yourdir/autobackupdb.php?key=yourkey