BAT script for MySQL database SQL file backup

Source: Internet
Author: User

@echo off
echo Online Redemption system automatic backup script (do not close) Contact: Tel:
: Loop
set/a "fdate=%date:~,4%%date:~5,2%%date:~8,2%"-5
If%time:~0,8%==17:06:00 (
If exist "D:\mysql_db_backup\lottery_online_ticket_%FDate%.sql" (del/q/A "D:\mysql_db_backup\lottery_online_ticket _%fdate%.sql ")

C \ "program Files (x86)" \ "Mysql\mysql Server 5.5" \bin\mysqldump.exe--opt-u root--password=admin lottery_online_ Ticket > D:\mysql_db_backup\lottery_online_ticket_%date:~,4%%date:~5,2%%date:~8,2%.sql
Echo Backup Complete ...

Echo Open [Ip]>ftp.up
Echo [Username]>>ftp.up
Echo [Password]>>ftp.up
Echo CD. \ >>ftp.up
Echo Binary>>ftp.up
Echo put "D:\mysql_db_backup\lottery_online_ticket_%date:~,4%%date:~5,2%%date:~8,2%.sql" >>ftp.up
Echo Bye>>ftp.up
Ftp-s:ftp.up
Del ftp.up/q

echo ============= Backup Wait =============
echo Online Redemption system automatic backup script (do not close) Contact: Tel:
)
Goto Loop
@echo on

BAT script for MySQL database SQL file backup

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.