Back up the database with Windows Task Scheduler and detect if Apache is functioning-sever Apache optimized configuration

Source: Internet
Author: User

1. First find the Windows Task Scheduler






2. Periodically call the. Bat program to point to the appropriate action by creating a Windows task schedule

1) Back up the MySQL data

The. bat code is as follows

@echo offset "ymd=%date:~,4%%date:~5,2%%date:~8,2%" e:/appserv/mysql/bin/mysqldump--opt-u root--password=password TestDB > E:/db/testdb_%ymd%.sql</span> @echo on
General settings 1 days to back up the database once, notice that the trigger needs to be enabled before it takes effect.



2) Regular monitoring of Apache server is normal

The principle is as follows

First, create a Web page that needs to contact the database, and the. Bat program runs when you first call this page to see if it returns to normal, such as returning a time-out or exception, calling the Apache server restart program to prevent the Web site from being accessed normally.

Restart Apache. bat

@echo offnet Stop apache2.2net start Apache2.2@echo on



Back up the database with Windows Task Scheduler and detect if Apache is functioning-sever Apache optimized configuration

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.