作者godelchen (godel)
看板Soft_Job
标题Re: [请益] 请问如何用记事本写批次备份档?
时间Sun Jul 27 01:51:46 2008
Use WinRAR to backup Active Directory is no the typical way, though saving disk
space, it is not the recommended by Microsoft.
Microsoft got it's onw ADSI interface to be called by vbs script.
ADSI (Active Directory Service Interfaces)
Another recommendation would be NTBackup.exe
http://technet.microsoft.com/en-us/library/bb727048.aspx
As for WinRAR, open a Command Prompt Box, then go to the WinRAR directory,
at c:\, keyin rar/? > help.txt, the content of help.txt looks like following,
Usage: rar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <path_to_extract\>
<Commands>
a Add files to archive
c Add archive comment
cf Add files comment
cw Write archive comment to file
d Delete files from archive
e Extract files to current directory
f Freshen files in archive
<Switches>
- Stop switches scanning
ac Clear Archive attribute after compression or extraction
ad Append archive name to destination path
ag[format] Generate archive name using the current date
ao Add files with Archive attribute set
ap<path> Set path inside archive
as Synchronize archive contents
av Put authenticity verification (registered versions only)
av- Disable authenticity verification check
c- Disable comments show
--------------------------------------------------------------
Any further reading, google "active directory" vbs or Winrar.
Best wishes, and good luck. Night.
: ' Backing My PDA Phone's SD Card Content into PC without multimedia files
: strComputer = "."
: Set WshShell = WScript.CreateObject("WScript.Shell")
: parameter = "u -r -m5 -ri6 -ilogD:\HermiteProfile\Desktop\SDBack.log
: -xI:\Videos\*.* -xI:\Musics\*.* -xI:\AudioBooks\*.* -x*.tr3 D:\PDArchives.rar
: I:\*.*"
: WshShell.Run """c:\program files\utility\winrar\rar.exe""" & parameter
: _________________________________________________________________
: save above code into text files with extension vbs, like backup.vbs.
: For parameter, you need to check up helpfile of winrar.
: : 小妹我是在一间公司的资讯部门当小小的MIS助理
: : 上个月主机AD的其中一颗硬碟挂点
: : 现在已换新硬碟
: : 不过工程师说批次备份档要重写
: : 想把E:\的资料夹写到D
: : 要写成rar的形式
: : 有人懂我在说什麽吗?
: : 工程师说他可以再另外找时间过来帮我写
: : 可是我还是希望能自己学着写看看
: : 但是我试了一下
: : 发现还是没有头绪
: : 公司只有我一个
: : 主管在大陆了
: : 所以没人可以帮我
: : 因为公司的mis不需要会程式
: : 所以我才可以进来上班...呜...
: : 有哪位厉害的大大可以解救我一下吗...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.133.133.85
1F:推 leicheong:这篇正解. 不过其实最重要的只是System State要用 07/27 21:27
2F:→ leicheong:NTBackup或其他专用的软体备份. 一般档案我想用winrar 07/27 21:28
3F:→ leicheong:也并无不可吧? :) 07/27 21:29