new partial mirror script
With the demise of ftp.stormix.com (at least for now), I cannot find any
rsync debian mirrors that are fast enough, so I have switched to
maintaining my partial mirrror with ftp. I write a little program that
does this quite well, the man page is below and the whole program is at
http://cvs.kitenet.net/joey-cvs/bin/debmirror
I wonder if there is any existing package it makes sense to put this
program in? One idea is to put it in libnet-perl as an example since it
uses that library.
DEBMIRROR(1) User Contributed Perl Documentation DEBMIRROR(1)
NAME
debmirror - Debian partial mirror script, with ftp and
package pool support
SYNOPSIS
debmirror mirrordir [options]
DESCRIPTION
This program downloads and maintains a partial local
Debian mirror. It can mirror any combination of architec-
tures, distributions, and sections. Files are transferred
by ftp, and package pools are fully supported. It also
does locking and updates trace files.
To support package pools, this program mirrors in three
steps.
1. download Packages and Sources files
First it downloads all Packages and Sources files for
the subset of Debian it was instructed to get.
2. clean up unknown files
Any files and directories on the local mirror that are
not in the list are removed.
3. download everything else
The Packages and Sources files are scanned, to build
up a list of all the files they refer to. A few other
miscellaneous files are added to the list. Then the
program makes sure that each file in the list is pre-
sent on the local mirror and is up-to-date, using file
size (and optionally md5sum) checks. Any necessary
files are downloaded.
OPTIONS
mirrordir
This required parameter specifies where the local mir-
ror directory is. If the directory does not exist, it
will be created. Be careful; telling this program that
your home directory is the mirrordir is guarenteed to
replace your home directory with a Debian mirror!
--debug
Enables verbose debug output, including ftp protocol
dump.
--progress -p
Displays progress bars as files are downloaded.
--source
Include source in the mirror (default).
--nosource
Do not include source.
--md5sums -m
Use md5sums to determine if files on the local mirror
that are the correct size actually have the correct
content. Not enabled by default, because it is too
paranoid, and too slow.
--passive
Download in passive mode.
--host=remotehost -h
Specify the remote host to mirror from. Defaults to
ftp.debian.org, you are strongly encouraged to find a
closer mirror.
--root=directory -r directory
Specifies the directory on the remote host that is the
root of the Debian archive. Defaults to "/debian",
which will work for most mirrors. The root directory
has a dists/ subdirectory.
--dist=foo[,bar,..] -d foo
Specify the distribution (version) of Debian to mir-
ror. This switch may be used multiple times, and mul-
tiple distributions may be specified at once, sepa-
rated by commas. Defaults to mirroring unstable.
--section=foo[,bar,..] -s foo
Specify the section of Debian to mirror. Defaults to
main,contrib,non-free.
--arches=foo[,bar,..] -a foo
Specify the architectures to mirror. You must prefix
the name of the architecture with 'binary-', as in
'binary-i386', which is the default.
Note that to mirror the debian-installer's part of the
archive, you can use 'debian-installer/binary-i386'
--cleanup
Do clean up any unknown files and directories on the
local mirror (see step 2 above). On by default.
--nocleanup
Do not clean up the local mirror after mirroring is
complete.
--ignore=regex
Never delete any files whose filenames match the
regex.
--skippackages
Don't re-download Packages and Sources files. Useful
if you know they are up-to-date.
--help
Display a usage summary.
EXAMPLES
debmirror /mirror/debian
Simply make a mirror in /mirror/debian, using all
defaults.
debmirror /mirror/debian --ignore=non-US/
debmirror /mirror/debian/non-US -h non-us.debian.org -r /debian-non-US \
-s non-US/main,non-US/contrib,non-US/non-free
Make one full mirror, and suppliment it with a mirror of
non-US, in a directory inside.
debmirror -a binary-i386,binary-sparc -s main -h ftp.kernel.org \
-d unstable -d testing /home/me/debian/mirror --nosource \
--progress
Make a mirror of i386 and sparc binaries, main only, and
include both unstable and testing versions of Debian.
Download from ftp.kernel.org.
COPYRIGHT
This program is copyright 2001 by Joey Hess
<joeyh@debian.org>, under the terms of the GNU GPL.
The author disclaims any responsibility for any mangling
of your system, unexpected bandwidth usage bills, meltdown
of the Debian mirror network, etc, that this script may
cause. See NO WARRANTY section of GPL.
AUTHOR
Joey Hess <joeyh@debian.org>
MOTTO
Waste bandwith -- put a partial mirror on your laptop
today!
2001-01-26 perl v5.6.0 1
--
see shy jo
Reply to: