Easily implement Web server isochronous automatic backup

  
        

In school, announcements, news, etc. will be published through the campus network. It is very important to make a backup of the data in the hard disk of the campus network WEB server. However, some professional storage devices and software are costly and often do not receive leadership recognition. In fact, using existing resources can also be easily achieved.
The original original FTP server for teachers to temporarily store some information. One day, the hard disk of this server was damaged. I thought it would not cause much damage, but the consequences were unexpected. It turned out that some teachers put some of the teaching materials they usually accumulated on the FTP server without leaving a backup because their hard disk capacity is relatively small. Later, through a lot of efforts, I only found some of the information, but the other parts will never disappear. This painful experience made the author realize that a more serious hidden danger exists: the FTP server is only used by a small number of people in the school, and all the announcements, news, etc. of the school are published through the campus network, and browsing the campus network has become a lot. One thing that teachers and leaders must do every day. If there are major problems with the hard disk of the Web server, the consequences will be unimaginable. Of course, you can increase the hot backup of the Web server by adding some professional storage devices, but this is a big investment for the average middle school with financial constraints. It is impossible to get the consent of the school leaders. How can we Do some attempts under the current conditions to make the data in the Web server not have catastrophic consequences? After some exploration, I finally found a simple and easy way to backup the machine. Since only the storage function is needed, the performance requirements are not high, the old machine can be satisfied, so I found an old computer, and through simple configuration, the Web server can automatically back up the data to this when the night is quiet and few people access it. The backup machine is implemented as follows. First, map the "backup directory" to the web
host
Create a “web backup” folder on the host that provides the backup and set the folder to share. Right click on the web host “My Computer", select “map network drive" (Figure 1), map the backup machine's "Web Backup" folder to the web host's "Z disk" ”, in the mapping, according to the prompt to enter the user name and password of the backup machine, then the backup operation of the Web host, the Z disk can be operated as a hard disk of the cost machine, simple and convenient. Second, regularly back up the incremental files in the site directory
When publishing news, announcements and other graphic information through the Web site, all the text information is stored in the SQL Server 2000 database, and some pictures, animations, videos, Document attachments are stored in the corresponding subdirectories under the site's home directory. When new content is published, the corresponding type files in the site directory will be increased, so it is necessary to periodically back up the site home directory. Over time, more and more content will be added to the site directory. If you do a full backup of the entire site every time, it will take a lot of time. Here, I use "XCOPY /S/E/D/Y source file object file to achieve incremental backup of the Web site. The xcopy parameters are: /s: copy non-empty directories and subdirectories, /e: copy all subdirectories including empty directories; /d: copy files with new source time than target time and files that do not exist in the target folder, implement increments Backup; /y: Prompt dialog box is forbidden when rewriting a file. Step 1: Create a batch file "Web site backup.bat". @echo offecho is doing a web site backup, please wait ……xcopy /s/e/d/yd:\\ Web site home directory z : \\Web site backup directory Echo Web site backup is about to close Exit second step: Automatically run batch files as scheduled, “Web site backup.bat". Take the Windows 2003 operating system as an example, select “start"one"all programs" one';attachment, one "system tool" one“task plan>, add a new "task plan" ”, according to the "Task Schedule Wizard" (Figure 2) prompts to configure, let “ Web site backup .bat” start at 2:00 am every day. Three, regular backup SQL SERVER 2000
Database files
All kinds of important data and text information in the site are stored in SQL Server 2000, so the backup of database files is more important. You can use the SQL Server 2000 software's own "Database Maintenance Plan" function to periodically back up the database files to the mapping directory to achieve special-time scheduled backup. Start SQL Server's "Enterprise Manager", in the "Directory of the console" under "Administration", find "Database Maintenance Plan", through the "Database Maintenance Plan Wizard" (such as Figure 3), the database file is configured to automatically back up to Z every day at 3: 00. To prevent the data generated by long-term backup from being able to accommodate the hard disk, you can choose to delete the data backup 1 week ago (Figure 4),

< Br> This will keep up to 7 days of backup data records in the backup, so as not to explode the hard disk.

Copyright © Windows knowledge All Rights Reserved