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

Number : 4079 Date : 2003-03-19 Author : Garry Deane Subject : Re: using xxcopy together with zip/arj compression Size(KB) : 2
--- In xxcopy@yahoogroups.com, anders thoresson wrote: > Using xxcopy for backup puroposes, one of the things I > want to do is to backup my most crucial files to a 250MB > zip disc. To extend the capacity of the zip-disc, is it > possible to set up a batch file that lets xxcopy work > closely with pkzip/arj? > > Written in pseudo-pseudo-code, I think something like > this would work, but is there a better way to do it: > > First, backup all files, make zip-file out of it and > put on the zip-disc. Then on every shutdown: > > 1. Backup changed or new files to a directory on my > hard drive. > 2. If any files exists in the directory or it's > sub-directories, update zip-file on zip-drive. > 3. Delete backuped files and directories from > temp directory. > 4. Shut down. That pseudo code approach looks fine. What you need to work out is how you will select files for putting into the temp backup directory because there are no files there for xxcopy to compare against. The usual and easiest approach is to use the archive bit to select the new or changed files. Generally speaking, the archive bit gets set whenever you create or modify a file but it is not bullet-proof because other programs may also manipulate the archive bit. Use the xxcopy switch /M to select files if the archive bit is set then clear it after the copy. However if you're going to use this approach, you may not need to use xxcopy. Your zip program probably also has a switch which will only add files if the archive bit is set and clear it after the zip operation. If your zip program allows for both updating (don't add files if same file is already in the zip) and using the archive bit, then you can just use that without the intermediate step of using xxcopy. A more complex approach which is more bullet-proof for this sort of operation has been posted by Kan some time ago. It involves creating a catalogue of all the files on the computer using /SZ0 (now /TR0) which creates a directory structure and file list of zero length files. There's an example of this in technical bulletin #11. This reference directory is then used to compare the timestamps of updated files and set or clear the archive bit of the source files depending on whether the source files are different to the reference directory files. Those files with the archive bit set can then be copied to the temp backup directory. Be warned however that this is a reasonably complex set of operations so is not for the faint hearted. One last point is that I would keep a copy of the zip file on the HDD and do the updates to that file. Once it has been updated, simply copy it over the previous version on the zip drive. This will save time accessing the relatively slow zip drive. Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.