Solved

How to scheduled Mysql Backup & send email notification

Posted on 2012-03-16
4
462 Views
Last Modified: 2012-08-14
Hi Friends,

I am using Windows 2008 Server & Mysql SQL Database, Now I am taking my sql backup by running batch file on scheduled, batch file code is as per below, can anyone help me for email notification configuration, whenever batch file will execute on scheduled & Task will be success  that time I should get notification on my mail id, I have configured SMTP on same server

Thanks in Advance


@echo off
for /f "tokens=1" %%i in ('date /t') do set DATE_DOW=%%i
for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i
for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i
for /f %%i in ('time /t') do set DATE_TIME=%%i
for /f %%i in ('echo %date_time::=-%') do set DATE_TIME=%%i
mysqldump -u helpdesk -p"Platys45" db_java > E:\Development\my_sql_hourly_backup\%DATE_DAY%_%DATE_TIME%_database.sql
0
Comment
Question by:Nilesh Havire
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
Radhakrishnan Rajayyan earned 334 total points
Comment Utility
Hi,

You can use some third party free application to take MySql backup and send a backup status via e-mail notification.

http://www.smipple.net/snippet/mauro.artizzu/cPanel%20crontab%20to%20backup%20mysql,%20files%20with%20email%20alert

http://sourceforge.net/projects/automysqlbackup/

Hope this helps.
0
 
LVL 20

Assisted Solution

by:Radhakrishnan Rajayyan
Radhakrishnan Rajayyan earned 334 total points
Comment Utility
0
 

Author Comment

by:Nilesh Havire
Comment Utility
I dont want to use 3rd party tool, & above link is for Linux, My script is working fine, I just want to get email notification whenever task will success


Regards
0
 
LVL 14

Assisted Solution

by:shahzoor
shahzoor earned 166 total points
Comment Utility
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now