Hello, I came up with this scenario of the use of batch mode while thinking of back-up schemes to use for myself. However, it could be that the last step needed in this scenario is not supported by rsync! Here's the scenario: At one time, /c/home/wer/work and /e/gold had identical content and were really huge (say, 200 GBytes). After some complex, intricate work, Mr. Wer did: rsync -a --only-write-batch=/e/cmds/foo /c/home/wer/work/ /e/gold Very soon after that, /c dies; and Wer needs to provide his Customer_A stuff that used to be in /c/home/wer/work/some/path/projects/c_a He needs this stuff immediately, meaning, Wer cannot wait to rebuild everything from /e/gold. However, gold/some/path/projects/c_a is merely 5 Megs -- but it is not the latest version. Wer starts by creating the directory /f/new_home/wer/work, and then uses -R as follows: rsync -aR /e/gold/./some/path/projects/c_a /f/new_home/wer/work which gives him an old version of c_a inside /f/new_home/wer/work/some/path/projects Question: How can Wer use the batch file /e/cmds/foo to recover c_a in a timely manner (recall /e/gold is 200 Gigs and Wer cannot wait to rebuild the entire /f/new_home/wer/work; and he needs c_a immediately)? Thanks, --Suresh
On 9/9/07, Suresh Govindachar <sgovindachar@yahoo.com> wrote:> Question: How can Wer use the batch file /e/cmds/foo to recover > c_a in a timely manner (recall /e/gold is 200 Gigs and > Wer cannot wait to rebuild the entire > /f/new_home/wer/work; and he needs c_a immediately)?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. Matt
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 some/path/projects/c_a into a new location such as /f/new_home/wer/work 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? Thanks, --Suresh