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

Number : 7218 Date : 2004-02-08 Author : Garry Deane Subject : Re: Making backups for quick roll-back Size(KB) : 1
--- In xxcopy@yahoogroups.com, "tyler_theobald" wrote: > We currently use robocopy for the majority of our server sync > jobs. However, I'm interested in a way to automate production > code migration rollbacks, so that if we migrate some files to > production and then want to quickly back out of the change (to > the previous state), we can do so. > I'm thinking that if the copy utility could make a backup > directory structure of all files as it replaces them, then I > could quickly roll back to the previous state by just copying > the backup dir structure over the production directories. > Does anyone know if XXCOPY can make backups like this or any > other utility that can facilitate this? At the moment, xxcopy is probably not ideal for this because it cannot accept an input list of files to operate on. Kan has indicated that he will implement a "junkyard" feature and a 3-way reference directory feature, both of which would probably be suitable, but these are still somewhere off in the future. You could do it by manipulating the archive bit but it rather depends on your directory structure and may be a bit messy. Here's a rough outline: set src=d:\latest\ set dst=c:\current\ set old=c:\old\ :: Clear the archive bit on all files in the %dst% xxcopy %dst% /az/s/q3 :: Set the archive bit on files which will be updated xxcopy %src% %dst% /aa/bi/s/h/q1 :: Copy tagged files to the %old% directory xxcopy %dst% %old% /bu/a :: Copy new files over the current version xxcopy %src% %dst% /bu Personally, I'd be inclined to use a zip utility. I'd use xxcopy to create the list of files which will be overwritten using: xxcopy %dst% %src% /bi/u/s/h/LL/fo:oldfiles.txt/q3 Then I'd use @oldfiles.txt as the input list to a command line zip utility and specify recording the directory hierarchy. You can then do the actual copy with xxcopy. Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.