Re: rsync mirror help!
Hi Nathan,
Basically, I'd like to avoid duplication download the file
itself if the symbolic link is available.
Example 1: Link within the rsync tree.
..../main/binary-main/base/adduser_3.11.1.deb ->
../../binary-all/base/adduser_3.11.1.deb
In this case, I'd like the rsync to just do the symlink
for me. Instead, it currently copies adduser_3.1.1.deb
twice. One in .../binary-main/base/. and one in
.../binary-all/base/.
Example 2: Link outside the rsync tree.
..../main/binary-i386/x11/x2x_1.27-5.deb ->
../../../../slink/main/binary-i386/x11/x2x_1.27-5.deb
In this case, I'd like rsync to copy the file to
main/binary-i386/x11
and since, slink/main/binary-i386/.... is not in the
rsync tree, then it would not be copied.
I've been playing with the option --copy-unsafe-links.
When omitting the option, the example 1 would work.
However, the case in example 2 would not.
when include the --copy-unsafe-links, then example 2 would
work but not example 1.
Here is the rsync script again. TIA.
#------------
TO=/home/debian/dists/potato/
FROM=rsync://debian.midco.net/debian/dists/potato/
#DEBUG=--dry-run
DEBUG=
# Get in the right directory and set the umask to be group writable
#
cd $HOME
umask 002
set +e
rsync \
--recursive \
--links \
--copy-unsafe-links \
--times \
--verbose \
--compress \
--archive \
--delete \
--delete-excluded \
--stats \
--progress \
--partial \
--exclude="Contents-alpha.gz" \
--exclude="Contents-arm.gz" \
--exclude="Contents-m68k.gz" \
--exclude="Contents-powerpc.gz" \
--exclude="Contents-sparc.gz" \
--exclude="binary-alpha/" \
--exclude="binary-arm/" \
--exclude="binary-m68k/" \
--exclude="binary-powerpc/" \
--exclude="binary-sparc/" \
--exclude="disks-alpha/" \
--exclude="disks-arm/" \
--exclude="disks-m68k/" \
--exclude="disks-powerpc/" \
--exclude="disks-sparc/" \
--exclude="source/" \
$DEBUG \
$FROM $TO > rsync.log 2>&1
savelog rsync.log > /dev/null 2>&1
Reply to: