[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Want to mirror Debian CDs



Mattias Wadenstein <maswan@acc.umu.se> writes:

> One problem with rsync and cron is that the directory name changes when
> there is a new revision or release. Just running an rsync over the
> debian-cd directory in cron would mean that when there is a release, rsync
> would start out by deleting the existing images and then start downloading
> the others.
> 
> If you have enough storage to maintain two copies of the cd images, there
> is a way around this for new revisions using the potato_test directory
> that is present on the master site. It contains hard links to the images
> and has names that doesn't change between revisions. Then you can use the
> fact that between revisions alot of the cd image does not change, rsync
> takes care of that. Also there will not be the day or two of interrupted
> service when you have no images and are downloading the 15 gigs from a
> mirror.
> 
> A good script would then:
> 1. rsync the potato_test directory
> 2. rsync the entire cd-image directory with --hard-links
> 
> Of course, if you don't mind being a couple of days late with new images,
> a plain rsync of the debian-cd (or debian-iso in my case) directory would
> work fine. Just remember to include --hard-links so that you won't get two
> copies of the images, if there is both a potato_test directory and the
> 2.2rev4 one. And a --delete-after would probably be a good thing to
> include too, so the rsync won't start out with deleting everything.

This last bit is about right, but I'm not sure why you suggested the 2
stage approach, or why you say that you need enough storage for 2
sets.

If you've got loads of disk space, then --delete-after means that the
old 2.2.* directory will hang around until the rsync's finished, but I
personally wouldn't bother with that.

Otherwise, --delete and --hard-links will sort the whole thing out for
you, as long as you include the potato_test directory.

The only spare disk space you should need is enough to hold the
biggest of the CDs the moment before it is moved into place by rsync,
so about 650MB spare should do it.

Cheers, Phil.
-- 
Say no to software patents!   http://petition.eurolinux.org/

|)|  Philip Hands [+44 (0)118 9545656]    http://www.hands.com/
|-|  Philip Hands Computing Ltd.      http://www.uk.debian.org/
|(|  Unit 1, Cherry Close, Caversham, Reading  RG4 8UP  ENGLAND



Reply to: