![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject[>>] [<<]Thread[>>]
Number : 9389 Date : 2004-11-30 Author : des4212001 Subject : Re: Destination Exclusions Re-revisited Size(KB) : 3
> You should not be using /zy! The idea of using 2 xxcopy > commands is to carry out the action of /clone (which is > based on /bi/zy) into 2 separate processes; a copy from > the source and; a deletion on the destination. However > to use exclusions for the deletion part, you must make > the deletion target the source. Since you want to use > /bz instead of /bi, just add that as an override to the > /bu switch. > > :: Step 1. Carry out the copy part. This copies brand new > :: or different size files to PC2 (except those excluded). > xxcopy PC1\ PC2\ /bu/bz/ex:PC1-DontCopy.txt > > :: Step 2. Carry out the deletion part. This deletes > :: "orphans" on PC2 (except those excluded) > xxcopy PC2\ PC1\ /rsy/bb/pd0/s/h/r/ex:PC2-DontDel.txt > > Because you want to synchronise the two PCs, repeat the > above in the reverse direction. > > :: Step 3. Carry out the copy part. This copies "orphans" > :: on PC2 which were excluded from being deleted in the > :: previous step (except those now excluded). Note that > :: there won't be any different size files since Step 1 > :: has already overwritten these (except those in > :: PC1-DontCopy.txt). > xxcopy PC2\ PC1\ /bu/bz/ex:PC2-DontCopy.txt.txt > > :: Step 4. Carry out the deletion part. This deletes > :: "orphans" on PC1 (except those excluded) > xxcopy PC1\ PC2\ /rsy/bb/pd0/s/h/r/ex:PC1-DontDel.txt > > Although I've used 4 exclusion files above, this is just > for clarity and may not be necessary. Because the > exclusions are only applied to the source directory, you > can have exclusions for both the source and the dest in > the same exclusion file. Only the exclusions that match > the source will be used. It depends on how complex > your exclusions are. > > Note that the order that the above commands are carried > out is important. The first /bu/bz command dictates which > PC is the "master". This PC is the one that has the > "correct" copy of a file if the file sizes are different. > Also, whether you carry out the deletion first then the > backup or the other way round can affect the way empty > directories are preserved. If you want to mirror empty > directories, carry out the delete first then the backup. > If you want delete empty directories, add /e0 to the /bu > command and you can carry out either command first. > > > I want this and I want that! But seriously, synchronization > > is a real can of worms compared to a "simple" incremental > > backup. I'm also dealing with 2 different file systems > > (which you helped me with previously) on 2 different machines > > that can be operated independantly. So time stamp comparisions > > are almost out of the question unless you want to be copying > > tons of stuff that really doesn't need to be transferred. > > You're right. Synchronisation is a particularly tricky > operation and you're probably better off using a specific > program for that task. Specialist synchronisation programs > can make more intelligent "rules" based decisions on things > such as both versions of a file being modified independently. > These programs catalogue the files and can sensibly compare > the 2 different sets of contents. > > Garry Duh! A quick glance into the xxcopy HTML help file, the Remove section, reveals yet another totally overlooked aspect. What can I say? Besides thanks. OK, so what I'm after can be done in 2 passes. Destination Exclusions would reduce that to 1! DES
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.