Rsync recursion

David Rasch rasch at raschnet.com
Tue Jul 30 13:55:02 EST 2002


> I'm trying to break up my rsync process by separating a directory tree
> into multiple rsync processes because I'm witnessing some errors trying
> to rsync large directory trees on Windows machines. After breaking up
> the tree I tried to rsync each individual directory starting from the
> bottom directory on up using the command:
>
> 	foreach ($array as $directory){	/*	$array = list of
> directories gathered from the larger directory I'm trying to rsync */
> 		rsync -vz -e ssh username at hostname:/src/$directory/
> /dst/$directory/
> 	}
>
To synchronize all the files in this directory, I believe you will need
the --recursive option.  This would work without the recursive option if
your 'foreach' statement iterated over all files in the tree.

Try this instead:

	rsync -vrz -e ssh username at hostname:/src/$directory/ /dst/$directory/



Good luck,

David





More information about the rsync mailing list