apt-mirror2(1)

NAME
apt-mirror2 - Python/asyncio reimplementation of the apt-mirror - a apt sources mirroring tool

SYNOPSIS
apt-mirror2 [-h] [---version] [file ... configfile]

DESCRIPTION
apt-mirror2 is the Python/asyncio reimplementation of the apt-mirror developed as drop-in replacement for the latest.

This project should be suitable as general apt-mirror replacement.

One of the main advantages of the apt-mirror2 over the apt-mirror - you should never got broken mirror in case apt-mirror2 returns 0 exit code. This is ensured by data integrity checks at all stages of mirroring.

Most of apt-mirror configuration directives are supported.

As of now proxy for FTP repositories is not supported.

File lists (ALL, NEW, MD5, SHA256, SHA512) are not written by default, but you can enable them with the write_file_lists option.

In addition there are some enhancements available:

-   Repositories without MD5 hashsums are correctly mirrored

-   Old index files are properly cleaned and don't produces errors in mirror processing

-   Standard source.list ‘[arch=arch1,arch2’] can be used to specify multiple repository architectures for mirroring. multiple codenames (or flat folders) can be specified using comma as delimiter.

-   ‘mirror_path URL PATH’ option may be used to specify PATH to use for saving mirror files instead of path that is generated from URL.

-   Additional configuration is loaded from the ‘*.list’ files in the directory named same as configfile with the .d suffix. Eg ‘/etc/apt/mirror.list.d/*.list’ .

-   Rate limit is enforced for overall download rate.

-   Slow download rate protection is enabled by default and can be configured via ‘mirror.list’ .

-   Non-zero exit code is returned if some of required files were not downloaded due to network or server errors or no repositories were configured.

-   HTTP user agent can be configured via user_agent configuration.

-   Configuration variables are exposed to postmirror_script.

-   ‘by-hash’ list option can be used to control whether Acquire-By-Hash Release option should be respected or enforced.

-   mirror wipe protection is available and configurable via ‘wipe_size_ratio’ and ‘wipe_count_ratio’ settings.

-   per-repository log files are available in the ‘var_path’ folder

-   ‘dists’ folder is almost atomicaly replaced using move instead of copy/link

-   native Prometheus metrics are supported

-   ... and others

Positional arguments:

file ... configfile
    Path to config file. Default ‘/etc/apt/mirror.list’

Options:

-h, ---help
    show help message and exit

--version
    Show version

ENVIRONMENT

APT_MIRROR_LOGLEVEL
    Log level as supported by Python logging module. Default ‘info’ .

FILES
/etc/apt/mirror.list
    Main configuration file
/etc/apt/mirror.list.d/*.list
    Additional configuration files

AUTHORS
Yuri Konotopov <ykonotopov@gnome.org>