Scenario Description: The recent need to implement a TG-level document under Windows, remote incremental backup to a distributed storage server, so the following design:
1, using rsync, after the test found that the file is very time-consuming, difficult to quickly achieve incremental backup;
2, using the small tools under Windows FastCopy with DOS script to achieve rapid incremental backup;
First, the backup directory of the backup server is automatically mounted to the local Z-disk (my backup server is shared with samba) and then called FastCopy for incremental backup purposes, as follows:
@ echo Offgoto begin remote backup data to distributed storage Specify path Miaocbin 10:35 2016/6/19 Friday: beginif exist z:\ (goto start) Else (net use Z: \\192.168.2.217\backup): Startecho sync D:\vssdata to Z:\vssdata fastcopy\fastcopy.exe/cmd =sync/auto_close/open_window "D:\ Configuration library \vssdata\*.*"/to= "Z:\vssdata" Echo sync D:\svnRepositories to Z:\svnRepositories Fastcopy\fastcopy.exe/cmd=sync/auto_close/open_window "D:\svnrepositories\*.*"/to= "Z:\svnRepositories": endnet Use Z:/d/yexit
Idea one: First, determine whether the z disk exists, if it already exists, then unload it, to avoid the drive letter is occupied, that is:
if exist z:\ (net use Z:/d/y) Else (net use Z: \\192.168.2.217\backup\vssqxptvss_bakdir)
Thought two: Determine whether the disk symbol exists (whether the network drive has been mapped), no mapping, the automatic mapping through the command, has been mapped well, then call fastcopy for incremental backup;
if exist z:\ (goto start) Else (net use Z: \\192.168.2.217\backup)
The above ideas can be, any choice.
This article is from the "Cold Tea" blog, please be sure to keep this source http://miaocbin.blog.51cto.com/689091/1663411
DOS mate fastcopy for remote incremental backup