Auto database backup and send email

Today i will share with you how to backup your database please sent your email. First, download the script Backup2email . If you want this script, I have script sample just send me message for script.Now unzip the file then, open the index.php file in notepad...





Then write the following code to configure your settings according to the area.


__________________________________________________________________________________
/***************************************************
Database settings
****************************************************/
$db_server = 'localhost'; // Database server, usually "localhost",
// on (mt) servers something like internal-db.s12345.gridserver.com
$db_name = 'database'; // Database name, leave empty for 'all databases'
$db_user = 'username'; // Database username
$db_pass = 'password'; // Database password
/***************************************************
E-mail settings
****************************************************/
$website = 'backup2mail.com'; // Your site's domain (without www. part)
$send_to = 'you@gmail.com'; // backup file will be sent to?
$from = 'real.address@' . $website; // some hosting providers won’t let you send backups from invalid e-mail address
/***************************************************
Misc options
****************************************************/
$full_path = '/home/username/public_html/backup';
// Full path to folder where you are running the script, usually "/home/username/public_html"
// (mt) servers have something like "/nfs/c01/h01/mnt/12345/domains/yourdomain.mobi/html/tools/backup2mail"

__________________________________________________________________________________


If you use your database server hosting c panel or localhost and the host will usually use a free hosting panel for this type of mysql.yourhostserver.com.

Then your database name, database username and password.


Then you enter the site name and that it will send mail to data backup.


The full path is /Home/place of the user declines to enter your c panel user name . Save and close the file, then remove.


Login now to c panel. The Log file Manager, then click on public_html. Create a folder with the name of the backup. Then , within the backup.


.htaccess
backup_log.txt
index.php



These three files to upload.


The Common Settings: Select this once a day.

Command: box, type the php -q/home/username/public_html/backup/index.php






To change the user name with your user name sipyanela Do not forget totake.


Then click the Add New Cron Job . Well done. You can now backup your email every day. However, if your database size to 20 MB of zip on it then  it could not be attach  email.


________________________________________________________________________

No comments:

Post a Comment