Gentoo Archives: gentoo-user

From: John Covici <covici@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Symlinked directories and rsync
Date: Sat, 19 Aug 2017 05:33:35
Message-Id: m3pobsp1eg.wl-covici@ccs.covici.com
In Reply to: [gentoo-user] Symlinked directories and rsync by Walter Dnes
1 On Sat, 19 Aug 2017 00:56:55 -0400,
2 Walter Dnes wrote:
3 >
4 > I've RTFM'd, and it looks like there is no way to get rsync to copy
5 > over symlinked directories as symlinks. E.g. I build Pale Moon browser
6 > from source for 3 machines at home. I prefer downloading the source
7 > once and symlinking to it from 3 different working directories. I also
8 > have a personal project where I analyze the same text data files in 3
9 > different ways. It makes things so much simpler to use the same code,
10 > with different runtime parameters. So I symlink the main data directory
11 > to 3 working directories. Even "better" (or worse) I've got a situation
12 > where I symlink directories to... other symlinked directories. Yes;
13 > symlinks pointing to symlinks work, even for directories.
14 >
15 > Unfortunately, rsync will not create a symlink where appropriate, but
16 > will de-reference the symlink, and duplicate multiple gigabytes of data
17 > needlessly. I eventually gave up trying, and made a tarball, and pushed
18 > it over to my "hot backup" machine, and extracted it there. That works
19 > OK for the initial setup, but is painfull for "minor incremental"
20 > updates.
21 >
22 > Am I missing something glaringly obvious, or is this a limitation of
23 > rsync? If so, is there another tool that can copy over symlinked
24 > directories properly?
25
26 I always use -av which copies simlinks correctly. -H is necessary to
27 copy hardlinks. If you need it -l also ensures this.
28
29 --
30 Your life is like a penny. You're going to lose it. The question is:
31 How do
32 you spend it?
33
34 John Covici
35 covici@××××××××××.com

Replies

Subject Author
Re: [gentoo-user] Symlinked directories and rsync Mick <michaelkintzios@×××××.com>