Windows uses Robocopy, forfiles to back up data

Source: Internet
Author: User
Tags robocopy

Event Description:

In the early 2016.11.14 , Zen Road (Bug management System) couldn't start. After a day of various toss can not start the service normally, find the database directory and backup directory, are empty. This is the server in wish my 31 birthday happy, do not take such a play.

to a normal state

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8A/F8/wKiom1g_02WD_7HrAACCGo5OFhw308.jpg-wh_500x0-wm_3 -wmp_4-s_3719821296.jpg "title=" qq20161201153657.jpg "alt=" Wkiom1g_02wd_7hraaccgo5ofhw308.jpg-wh_50 "/>

to start a failed state

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8A/F4/wKioL1g_0peiEqbMAACkybJUK1I986.jpg-wh_500x0-wm_3 -wmp_4-s_972159019.jpg "title=" qq20161201152749.jpg "alt=" Wkiol1g_0peieqbmaackybjuk1i986.jpg-wh_50 "/>

Self-existent problems:

Since the heart has not been the Zen road, the server's backup strategy has never been checked. Nor did the "disaster recovery" test. So that after the problem only want to understand the system, look at the official documents, find the database directory and so on.

So far do not know why the system is hanging, hanging at the same time, the database file a little shadow. I'm sorry for the test to be able to re-record the bug.

Solution:

With this lesson, and then re-install Zen Road, the back-up of the backup strategy, in order to prevent a single point of failure, the Backup database folder, every night back to the "file Server", Zen Road local and file server database retention policy set to 3 days.


First, re-install, open the Zen channel backup strategy

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8A/F5/wKioL1g_5u7xGzk7AAHL26aKxNY658.jpg "title=" Qq20161201160850.jpg "alt=" Wkiol1g_5u7xgzk7aahl26akxny658.jpg "/>

Zen Road has already defined a backup strategy that backs up data to the specified folder every 12:30

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8A/F9/wKiom1g_5wTS40dMAAMTZuXRb9M525.jpg "title=" Qq20161201161025.jpg "alt=" Wkiom1g_5wts40dmaamtzuxrb9m525.jpg "/>

The default is reserved for 14 days, this is changed to 3 days (later found that the backup retention days can be changed 650) this.width=650; "src=" Http://img.baidu.com/hi/face/i_f08.gif "alt=" i_f08.gif "/ >)

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8A/F5/wKioL1g_5zfihJ4EAAI0RSmV0L8736.jpg "title=" Qq20161201161856.jpg "alt=" Wkiol1g_5zfihj4eaai0rsmv0l8736.jpg "/>


Second, backup data

Put the following statement, made *.bat, in the planning task, every night 2 o'clock to execute

Copy the local folder to the remote machine using the copy, Robocopy command, respectively

Simple.

Copy C:\pmtool\xampp\zentao\tmp\backup \ \ Technical department share \ Zen Road Back

Detailed point of

Robocopy C:\pmtool\xampp\zentao\tmp\backup z:\ Technology Division shared Zen Road Back * * */maxage:3/xf *.jpg

Description: Maxage:3 specified the number of days, before the Zen channel can be set directly to the number of days to backup/xf for files other than JPG (many more)

For extra study

forfiles/p D: \ Technical department shared \ Zen Road back/s/m *.php/d -3/c "cmd/c del @path"

Note: This is also redundant, Zen Channel settings only save 3 days of data, will not produce more files.

This command can be used for normal servers to find files up to 3 days ago and remove the

This article is from the "Zhao Dongwei blog" blog, make sure to keep this source http://zhaodongwei.blog.51cto.com/4233742/1878566

Windows uses Robocopy, forfiles to back up data

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.