Steps :-
- Create a bath file(.bat extension)in notepad.
- Open notepad and write the queries of MySQL and save it as file-name.bat
- use Mysqldump statement to create a backup of your database.
- (ex. mysqldump database_name -u user -ppassword >backup.sql)
@echo off
set mnth=%date:~4,2%
set day=%date:~7,2%
set d=%year%_%mnth%_%day%.sql
2.Schedule task using windows task scheduler
2.Schedule task using windows task scheduler
- GOTO: Control Panel\System and Security\Administrative Tools
- select task scheduler and create a new task
- configure it according to the requirements
- Under action select "start a new program" and open the batch file created.
No comments:
Post a Comment