Rsync behaviour on harddisc crash

Linux Expert linuxexpert25 at
Thu Mar 18 11:28:59 MDT 2010

On Thu, Mar 18, 2010 at 9:48 AM, Mac User FR <macuserfr at> wrote:

> Wouldn't it be better to use conditional expressions from sh with a smaller
> footprint than rsync --list to check if the directory exists?
> I think on something like:
> -d file
> 	      True if file exists and is a directory.
> (source: man sh)
It would if the remote file system was mounted locally - that's how I do
it.  However in this case rsync needs to connect to the remote filesystem
via an rsync daemon running on the remote server.

I first thought of recommending to run rsync --list server::module , but
that would be much more overhead as it would list every file under the
top-level directory.  Listing a sub-directory will have less files to list
so will be faster.

The selection of which sub-directory to use is important here.  You'd want
to choose a sub-directory that is not likely to be deleted or renamed.
Although if it is and you setup the  notification command properly, you'll
know about it the first time rsync tries to run.  But this will not delete
the files as before, so is a good solution.  The other factor in the
selection of the sub-directory to list is how many files it contains.
Ideally it would be a small subdirectory with not many files.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rsync mailing list