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

Number : 4708 Date : 2003-06-02 Author : Garry Deane Subject : Re: Exclusion Question Size(KB) : 2
--- In xxcopy@yahoogroups.com, Kan Yabumoto wrote: > > Garry wrote: >> To use the example given by "edlight0" where he wants to >> restore from a backup but preserve some selected files, >> instead of using /CLONE, he can use the following 2 step >> process: > >> :: Step 1 - copy any changed files from the backup >> >> xxcopy D:\backup\ C:\ /backup/xpagefile.sys/xhiberfil.sys >> >> :: Step 2 - delete any extra files in C:\ if they don't >> :: exist in the backup but keep pagefile.sys and hiberfil.sys >> >> xxcopy C:\ D:\backup\ /bu/rsy/pd0/xpagefile.sys/xhiberfil.sys >> > > We know Garry is often better than the author of XXCOPY in > exploiting the features from the users perspective. > > Here, Garry's suggestion had an inadvertent typo error > (it could have come from my earlier typo error --- entirely > possible.) > > The second xxcopy command should use /BB/RSY rather than > /BU/RSY. That is, we want to delete unique files in the > C:\ directory rather than common files in both C:\ and > D:\backup\ directories. Kan, you're right that /BB is better than /BU but not for the reason given. Except possibly after a copy failure, as far as I can tell, /BU/RSY and /BB/RSY will behave identically (although you need to add a handful of extra switches to /BB or use /BU/BB/RSY). /BU is based on /BI which excludes a file if it already exists in the destination with the same time and size /BB excludes a file if it already exists in the destination Since the first step copies files from \backup\ to C:\, there should only be 2 groups of files in C:\ - files which are are identical in both C:\ and \backup\ and extra files in C:\ which we want to delete. Using /BI/RSY excludes the identical files and deletes the orphans the same as /BB/RSY. The subtle difference is that /BI will only exclude the file if the timestamp is identical in both the source and dest whereas /BB will exclude the file if it exists in both irrespective of the timestamp. The only circumstances I can think of where this might make a difference is if the first copy fails for some files or possibly if there are some odd timestamp granularity issues. Using /BI/RSY would result in the old copy of the file in C:\ which should have been updated in the first step but wasn't, being deleted. Using /BB would leave this out of date file intact which would be the better option. Since /BU also includes a bunch of other important switches like /S/H/R etc., I'd suggest a slightly better option is therefore: :: Step 2 xxcopy C:\ D:\backup\ /bu/bb/rsy/pd0/xpagefile.sys/xhiberfil.sys Please let me know if I've got this wrong but it appeared to work as I expected when testing. Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.