Batch mode scenario ("use case")

Suresh Govindachar sgovindachar at
Sun Sep 9 23:17:05 GMT 2007

  Responding to the question of how to use the batch file 
  /e/cmds/foo created via the command:

  > rsync -a --only-write-batch=/e/cmds/foo /c/home/wer/work/ /e/gold

  to selectively restore a subdirectory of work/ such as 


  into a new location such as  


  which has a copy of some/path/projects/c_a gotten from /e/gold but
  is otherwise empty, Matt wrote:

  > Rsync currently doesn't provide a good way to do this.  It would
  > be great if sender filters could be used to control which
  > file-list entries from the batch file are processed.  For now, a
  > hackish way to quickly recover a subdirectory is to --read-batch
  > to a destination that has been set up specially so that the user
  > cannot write to anything in the destination except the
  > subdirectory to be recovered.

  Is there a specification for the format of the batch file?  Might
  it be possible to write a script to read /e/cmds/foo and create a
  new batch file that would correspond to having been created while
  rsync'ing --only-write-batch of work/<path>/c_a with gold/<path>/c_a?



More information about the rsync mailing list