Data Automatic Backup solution graphic _ server Other

Source: Internet
Author: User

1: Network disk automatic backup (isolated backup)

Isolation Backup Introduction: Directly in the network set up projects, files to write the manuscript is likely to be with the network disk data is not synchronized to cause data loss integrity, file damage, so this way is not desirable. Therefore, isolated backup, the so-called isolated backup is written in a folder, when the computer is turned off automatically back up all the contents of a folder to the B folder (where b folder is the network disk directory)

After isolation, the manuscript and backup do not interfere with each other, double data. The process of achieving the goal is as follows:

1. When the network disk program running, automatically back up the contents of the Network Disk folder

2. Copy the contents of the folder that is currently being written to the network disk folder at shutdown

Data Test screenshot:

On the left side is the computer on the right side of the network disk, which is the automatic data backup when the computer is shut down.

Screenshot of network disk Generation folder

-----------------------------------------------------
The implementation process is as follows: Create a batch program code as follows:

Copy Code code as follows:

@echo off
Set "mydate=%date:~0,4% year%date:~5,2% month%date:~8,2% Day"
If exist "D:\ Jinshan fast disk \%mydate%*" (
ECHO has been backed up.
Exit
) Else (
Goto:back
)
: Back
net stop MSSQLServer
Set "now=%date:~0,4% year%date:~5,2% month%date:~8,2% Day%time:~0,8%"
Set "now=%now::=%"
Set "Now=%now: =%"
MD "D:\ Jinshan fast Disk \%now%"
xcopy D:\ Company Project \*.* d:\ Jinshan fast disk \%now%/e/h
Echo MD "D:\ Jinshan fast Disk \%now%"
Pause

(Note: Here I am backing up the database that contains the SQL, so I stopped the SQL service backup again, otherwise I can't copy the SQL database file)
How do I get this batch shutdown running after the batch process is written?

The following actions can be:

1: Start--run--input gpedit.msc then come out. Group Policy. Computer Configuration---Windows Settings---scripts (startup and shutdown) Double-click the shutdown policy, and then click Add--Browse to your batch file.

It's OK.
As shown in figure:

Done.

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.