From: Dan S. <da...@ba...> - 2007-08-01 22:55:07
|
OK. The list bounced my first message because of the attached .bat file. And the second because I forgot to delete the attachment. So now it's just stuck on the end of the message. I hope it doesn't use up all the % characters in the computer. Ntbackup can do it. I schedule a batch file that generates the .bks file, which has to be little-endian unicode with no FEFF. Then it runs ntbackup. I don't know about win2k, but I've copied ntbackup to XP home and it works fine. I've attached the batch file if you want to see the horrible twisted cmd syntax. It's a work in progress. However, we recently lost a Seagate drive (another one!?), and with it a .pst file. There was a fairly recent backup, so we're ok, but it WILL BE backed up DAILY in the future. Dan Smisko Balanced Audio Technology 1300 First State Blvd. Suite A Wilmington, DE 19804 (302)999-8855 (302)999-8818 fax da...@ba... =============================================================== @echo off setlocal : %1 = backup directory %2 = backup name %3 = -d if "%3"=="-d" echo on set src=I:\admin set dst=C:\admin set req=ntbackup.exe subinacl.exe : find newest subdirectory in %1, set full backup directory path, make backup directory for /f %%D in ('dir /od /b "%1"') do set budir=%1\%%D\%2 mkdir %budir% set log=%budir%\backup.log echo Installing required programs for %%F in (%req%) do xcopy "%src%\%%F" "%dst%\" /f /y set PATH=%PATH%;%dst% : : Part 1 - use ntbackup to back up up any files being held open, e.g. : C:\Documents and Settings\*\Local Settings\Application Data\Microsoft\Outlook\Outlook.pst : set bks=%budir%\ntbackup.bks set bkf=%budir%\ntbackup.bkf for %%D in ("%ALLUSERSPROFILE%") do set doc=%%~dpD set olk=Local Settings\Application Data\Microsoft\Outlook set pst=Outlook.pst set nam=%olk%\%pst% : ntbackup needs .bks file to be unicode, little-endian, no FEFF -- use cmd /u : to back up an entire directory, end name with \ : find Outlook.pst for all users del %bks% for /d %%D in ("%doc%*") do if exist "%%D\%nam%" ( cmd /u /c echo %%D\%nam% >>%bks% echo %%D\%nam% >>%log% echo %%~nD %pst% ) for /f "tokens=1,*" %%A in ("%DATE%") do set bdate=%%B for /f "delims=." %%A in ("%TIME%") do set btime=%%A set label=Outlook %bdate% %btime% : /v verify /r restrict access /rs remote storage /hc hardware compression /m mode /l log echo Backing up files ntbackup backup "@%bks%" /f "%bkf%" ^ /j "Outlook Backup" /d "PST files" /n "%label%" /v:no /r:yes /rs:no /hc:off /m normal /l:s : : Part 2 - use subinacl to copy all ACL's : set acl=%budir%\acl.log echo Logging ACL's subinacl /noverbose /nostatistic /fileonly C:\ >%acl% subinacl /noverbose /nostatistic /subdirectories C:\ >>%acl% : to restore -- subinacl /noverbose /playfile %acl%.log echo Backup finished -- %TIME% >%log% =============================================================== FleX wrote: > BackupPc often isn't able to backup pst file, because the file is still > open. > Do you know a workaround to backup these files ? (a way to kill outlook > or something else) > > |