[<<]Message[>>]    [<<]Author[>>]        Subject[>>]        Thread[>>]

Number : 4202 Date : 2003-04-04 Author : anders thoresson Subject : verify backup batch files Size(KB) : 2
Hi, With the help from this group, I have a set of batch files that seems to backup my data the way I want it to, using a reference directory with zero byte-files. I've been trimming the commands, and just want to check with the group that I'm not making any big mistakes. Looking in the destination directories, changed files seems to be updated, both in DST and REF. But to be sure, I would appreciate if someone could have a look a my files to see if I'm making any dangerous mistakes. create_ref.bat is run once, to set up the reference directory as well as copy all present files to the destination. create_ref.bat contains these two xxcopy-commands for every directory being backuped: xxcopy "c:\web\" "d:\backup\ref\c\web\" /CLONE /TR0 /V0 /I /EXc:\batch\exclude.lst xxcopy "c:\web\" "d:\backup\backup\c\web\" /CLONE /I /EXc:\batch\exclude.lst For each directory being backuped, I use backup_XXX.bat: @ECHO OFF setlocal set backup="Documents and settings" set src="c:\documents and settings\anders\mina dokument\" set ref="d:\backup\ref\c\documents and settings\anders\mina dokument\" set dst="d:\backup\backup\c\documents and settings\anders\mina dokument\" set log="d:\backup\log\/doc.log" set tagfiles="d:\backup\log\/doc_tagfiles.log" set bufiles="d:\backup\log\/doc_bufiles.log" set reffiles="d:\backup\log\/doc_reffiles.log" set err="d:\backup\log\doc.err" :: Do the backup xxcopy %src% /AZ /S xxcopy %src% %ref% /CB /AA /FF /S /H /U0 /BX /I /FO%tagfiles% /FMLDTZ /EXc:\batch\exclude.lst xxcopy %src% %dst% /CB /A /S /FF /H /KS /ZY /Y /PZ0 /I /ON%log% /FO%bufiles% /FMLDTZ /EXc:\batch\exclude.lst xxcopy %src% %ref% /CB /CLONE /FF /BX /PZ0 /TR0 /V0 /I /OA%log% /FO%reffiles% /FMLDTZ /EXc:\batch\exclude.lst :: Check for any errors and if so, create an error log if errorlevel 0 goto :next if errorlevel 100 goto :exit :: There was an error, create an error log echo %date% %time% Error number %errorlevel% occurred during backup for %backup%>%err% :next :: Carry out zip operation :exit :: Issue shutdown command As it is right now, I run my backup at login. Using Win2k, I havn't found a way to run it at shutdown? Best regards, -- anders thoresson
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.