after the measurement product deploys the service end, because the service side has each kind of encapsulation encrypted attachment, the file and so on data, in order to safeguard the security of the information, in addition to establish the high availability backup mechanism, we can through the batch script, unifies to the system plan to carry on the local or the offsite backup, takes the capacity situation, may also adopt the incremental
The following code is a sample batch script that allows you to write a simple and powerful server-side backup strategy in your own way:
@echo off
REM ************************************************************
REM * Server-side file incremental backup, annual data saved in Destdir.
REM * requires setting source directory (SourceDir), backup directory (destdir=).
REM * If you want to back up files on the server offsite, make sure you can map the disks.
REM * and start the offsite backup code.
REM * Logs have information that records backups.
REM * The script can be added to the system plan for daily backups.
REM ************************************************************
REM ************************************************************
REM * Set Varialbes
REM ************************************************************
REM * Please set date FORMAT:YYYY-MM-DD
Set yearnum=%date:~0,4%
Set Sourcedir=c:\oaserver
Set destdir=d:\oabakdir\oaserver%yearnum%
REM * Offsite backup file mapping *******************************************
REM ************************************************************
REM * Remote Address
REM * Net use U: \\xxx.xxx.xxx.xxx\d$/user:administrator "Password"
REM * Set destdir=u:\oabakdir\oaserver%yearnum%
REM ************************************************************
if not exist%destdir%mkdir%destdir%
Set Logfilename=d:\oabakdir\oaserver%date:~0,4%%date:~5,2%%date:~8,2%. log
REM ************************************************************
REM *start
REM ************************************************************
echo ***************************************** >>%logfilename%
echo start:%date%%time% >>%logfilename%
echo START COPY (%date%%time%):%sourcedir% to%destdir% >>%logfilename%
xcopy%sourcedir%%destdir%/d/e/c/i/h/r/k/y>>%logfilename%
echo END COPY (%date%%time%):%sourcedir% to%destdir% >>%logfilename%
echo ***************************************** >>%logfilename%
REM * Delete Geo map *******************************************
REM ************************************************************
REM * Net use U:/delete
REM ************************************************************
@echo on
Exit
Original address: http://bbs.delit.cn/thread-298-1-1.html
Reprint please specify the source:
Author: metric Technology www. Delit. cn
Metric system server-side file local geo-differential backup (incremental backup) script example