rsync operation times out on excluded directory - Tools
This is a discussion on rsync operation times out on excluded directory - Tools ; Hello list,
I have the following problem for awhile now. A backup script is running on
server Backup. Every night a complete backup of /home is made of server Server,
using rsync over SSH. (rsync version 3.0.2 on Debian/Linux)
Now. ...
-
rsync operation times out on excluded directory
Hello list,
I have the following problem for awhile now. A backup script is running on
server Backup. Every night a complete backup of /home is made of server Server,
using rsync over SSH. (rsync version 3.0.2 on Debian/Linux)
Now. There is one user, that has a NFS mount in his homedirectory on Server
"/home/username/mnt". This user uses NFS to access his laptop's filesystem. At
night the laptop is not connected, so the mountpoint is not accessible:
root@server:~# mount
10.0.0.217:/Users/username/Development on /home/username/mnt/dev (nfs)
To prevent errors with rsync, I exclude the directory, using this option:
--exclude=/home/username/mnt
However, even though I exclude this directory, rsync still attempts to access it:
2008/08/06 01:05:41 [23001] receiving file list
2008/08/06 01:27:44 [23001] rsync: readlink "/home/username/mnt/dev" failed:
Operation timed out (60)
2008/08/06 01:34:57 [23001] IO error encountered -- skipping file deletion
The manpage says that using the exclude option, will prevent it from traversing
beneith an exclude-path.
Since I exclude /home/username/mnt, howcome it times out on /home/username/mnt/dev?
Is there a solution? Other than lazy-unmounting the NFS filesystem?
--
Rob klein Gunnewiek
BWSS B.V. Deventer (http://www.bwss.nl)
Tel +(31) 0570-665140
Fax +(31) 0570-665141
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-
Re: rsync operation times out on excluded directory
On Thu, Aug 07, 2008 at 10:53:34AM +0200, Rob klein Gunnewiek wrote:
> However, even though I exclude this directory, rsync still attempts to
> access it:
Yes, this has come up before. The current exclude code wants to know in
advance if the items is a directory so that it knows which rules apply
to the name and which don't. Because of that rsync, will stat every
file before checking to see if it is excluded. If the exclude code was
rewritten to take a name and return two results, one for dirs and one
for non-dirs, then the name could be excluded prior to a stat call
anytime that the two results agreed on exclusion. I'm going to look
into such an implementation and possibly include it in 3.1.0.
In the meantime, there your options are: (1) exclude the parent dir
of the mount (/home/username/mnt), which will prevent rsync from ever
trying to stat the mount itself, (2) change the current mount to a
symlink to a mount, and move the actual mount to a place where you can
exclude its parent directory, or (3) create a way for the laptop-user
to unmount that mount prior to leaving and remount after arriving.
...wayne..
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-
Re: rsync operation times out on excluded directory
Wayne Davison schreef:
> On Thu, Aug 07, 2008 at 10:53:34AM +0200, Rob klein Gunnewiek wrote:
>> However, even though I exclude this directory, rsync still attempts to
>> access it:
>
> [..]
>
> In the meantime, there your options are: (1) exclude the parent dir
> of the mount (/home/username/mnt), which will prevent rsync from ever
> trying to stat the mount itself, (2) change the current mount to a
> symlink to a mount, and move the actual mount to a place where you can
> exclude its parent directory, or (3) create a way for the laptop-user
> to unmount that mount prior to leaving and remount after arriving.
>
Thanks a lot for your answer.
After reading the man-page a few times, and many google searches, I decided to
finally ask the question here. And as always happens to me, once I asked it, I
find the problem. Sorry.
The problem was that I was copying /home (rsync server:/home ...), and the
exclude path needed to be relative to this. Newbie mistake
. So, now it works,
using: --exclude=username/mnt (instead of --exclude=/home/username/mnt). Now
you're probably saying 'duh' ;-)
However, I wonder why the error I am getting is: rsync: readlink
"/home/username/mnt/dev". Why would it try calling 'readlink' on the directory?
--
Rob klein Gunnewiek
BWSS B.V. Deventer (http://www.bwss.nl)
Tel +(31) 0570-665140
Fax +(31) 0570-665141
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-
Re: rsync operation times out on excluded directory
On Fri, 2008-08-08 at 16:57 +0200, Rob klein Gunnewiek wrote:
> The problem was that I was copying /home (rsync server:/home ...), and the
> exclude path needed to be relative to this. Newbie mistake
. So, now itworks,
> using: --exclude=username/mnt (instead of --exclude=/home/username/mnt). Now
> you're probably saying 'duh' ;-)
--exclude=/username/mnt would be more correct, as --exclude=username/mnt
will match any file anywhere inside /home whose path ends in
username/mnt .
> However, I wonder why the error I am getting is: rsync: readlink
> "/home/username/mnt/dev". Why would it try calling 'readlink' on the directory?
It looks like the error message is not completely accurate: a stat
failure will also be reported as "readlink failed". The message should
probably say "readlink_stat failed".
Matt
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEABECAAYFAkid6c4ACgkQC+xSYN/Rlfvh+ACeLb1tf3AW5jcw8gH7qClQIolC
8akAnRWxiRUW0M/GtoPsFav5z25QvJjJ
=VJRp
-----END PGP SIGNATURE-----