Solved

How to scheduled Mysql Backup & send email notification

Posted on 2012-03-16
4
470 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 21

Accepted Solution

by:
RK earned 334 total points
ID: 37732098
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 21

Assisted Solution

by:RK
RK earned 334 total points
ID: 37732099
0
 

Author Comment

by:Nilesh Havire
ID: 37732119
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
ID: 37733001
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account 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 …

912 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

20 Experts available now in Live!

Get 1:1 Help Now