apt-mirror - apt sources mirroring tool
A small tool that provides ability to mirror any parts (or
even all) of Debian and Ubuntu GNU/Linux distributions and/or any other
apt sources which typically provided by open source developers.
Main features:
- Configuration as simple as apt's "sources.list"
- Supports multithreaded downloading
- Supports multiple architectures at the same time
- Works on all POSIX compliant systems with perl, gunzip, and wget
- Works extremely well on overloaded internet channel
- Never produces an inconsistent mirror including while mirroring
- Automatically removes unneeded files
- Fully pool comply
Documentation
There is no easier way to create Debian or Ubuntu mirror than make it using apt-mirror!
Well, to start mirroring with apt-mirror you should do three main tasks:
- Install apt-mirror
- Configure sources
- Running apt-mirror
1. Installation
Debian ( Stable "Etch" or Newer ) and Ubuntu ( any Version ) users just need to:
# apt-get update
# apt-get install apt-mirror
Rest users need to download sources and install it by hand:
- download apt-mirror_xxx.orig.tar.gz
- extract it and put apt-mirror script to /usr/local/bin or somewhere similar
- put mirror.list config file to /etc/apt/ (or any other place such as /usr/local/etc,
but in this case do not forget to always specify full path to it in command line)
2. Configuring sources
Open 'mirror.list' (from /etc/apt/ or whatever you installed it to) and add needed sources
like in /etc/apt/sources.list. Finally your mirror.list may looks like this:
# apt-mirror configuration file
##
## The default configuration options (uncomment and change to override)
##
#
# set base_path /var/spool/apt-mirror
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
#
# set defaultarch <running host architecture>
# set nthreads 20
#
##
## Example sources
##
# sarge's section
deb http://ftp.us.debian.org/debian sarge main contrib non-free
deb-src http://ftp.us.debian.org/debian sarge main contrib non-free
# this source required for network installation ability (udebs)
deb http://ftp.us.debian.org/debian sarge main/debian-installer
# security updates is always good thing to install
deb http://security.debian.org/debian-security sarge/updates main contrib non-free
deb-src http://security.debian.org/debian-security sarge/updates main contrib non-free
# sarge-proposed-updates's section
deb http://ftp.us.debian.org/debian sarge-proposed-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian sarge-proposed-updates main contrib non-free
##
## Cleaner configuration example
##
#
# set cleanscript $var_path/clean.sh
#
# What directories should we clean up
# (i.e. remove files missing in up-to-date indexes)
clean http://security.debian.org/
clean http://ftp.us.debian.org/
# But exclude this directories
# (which is not managed by apt and apt-mirror)
skip-clean http://ftp.us.debian.org/debian-cd/
skip-clean http://ftp.us.debian.org/debian/dists/sarge/main/installer-i386/
skip-clean http://ftp.us.debian.org/debian/doc/
skip-clean http://ftp.us.debian.org/debian/tools/
skip-clean http://ftp.us.debian.org/debian/project/
3. Running apt-mirror
Ok. Now we may run 'apt-mirror' by the following :
Switch to the "apt-mirror" user
# sudo su - apt-mirror
Run apt-mirror
$ apt-mirror
or (for non-debian users)
$ apt-mirror /usr/local/etc/mirror.list
You also can run apt-mirror from cron. Uncomment line in /etc/cron.d/apt-mirror for this purpose.
Download
Current version of apt-mirror is 0.4.8. You can download it...
Links
About
apt-mirror was originaly written by Dmitriy Khramtsov to create his university's debian mirror.
It is Currently Developed and Maintained by Brandon Holtsclaw.