Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to exclude a directory from rsync
Date: Tue, 16 Nov 2010 21:13:37
Message-Id: 201011162112.55827.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] How to exclude a directory from rsync by Alan McKinnon
1 On Tuesday 16 November 2010 14:15:00 Alan McKinnon wrote:
2 > Apparently, though unproven, at 15:28 on Tuesday 16 November 2010, Mick did
3 > opine thusly:
4 > > On 16 November 2010 09:00, Stefan G. Weichinger <lists@×××××.at> wrote:
5 > > > Am 15.11.2010 23:50, schrieb Mick:
6
7 > > > You don't show us what you did ...
8 > >
9 > > I ran the same as before but changed the path to the one you suggested:
10 > >
11 > > ===============================
12 > > 'rsync -a -l -v --exclude "./System Volume Information"
13 > > -e "ssh -c blowfish -l root" /mnt/User_WinXP/
14 > > 10.10.10.25:/home/httpd/backup'
15 > >
16 > > sending incremental file list
17 > > rsync: opendir "/mnt/User_WinXP/System Volume Information" failed:
18 > > Permission denied (13)
19 > >
20 > > [snip ...]
21 > >
22 > > rsync error: some files/attrs were not transferred (see previous
23 > > errors) (code 23) at main.c(1042) [sender=3.0.7]
24 > > ===============================
25 > >
26 > > The System Volume is shown as 0700 (mounted with default permissions)
27 > > and is owned by root when viewed from Gentoo.
28 >
29 > Don't think of --exclude as being a file path match, think of it as more a
30 > regex (usually just a literal one). It specifies a pattern that if found if
31 > the full pathname, results in the file not being synced.
32 >
33 > The string "./System Volume Information" of course appears nowhere in the
34 > rsync output list of files.
35 >
36 > I think you want:
37 >
38 > --exclude "/System Volume Information"
39 >
40 > Then rsync will not attempt to open the directory at all
41
42 Excellent, it worked! :-)
43
44 Thank you all for your help.
45 --
46 Regards,
47 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] How to exclude a directory from rsync Alan McKinnon <alan.mckinnon@×××××.com>