table of contents
- trixie-backports 14-1~bpo13+1
- testing 14-1
- unstable 14-1
| apt-mirror2(1) | General Commands Manual | apt-mirror2(1) |
NAME¶
apt-mirror2 — an
apt sources mirroring tool
SYNOPSIS¶
apt-mirror2 |
[-h] [--version]
[file ... configfile] |
DESCRIPTION¶
apt-mirror2 is the Python/asyncio
reimplementation of the apt-mirror - an apt sources mirroring tool.
This project is intended to be a general drop-in apt-mirror replacement.
One of the main advantages of the
apt-mirror2 over the apt-mirror is that it never
leaves a broken mirror behind, provided it exits with code 0. 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:
- 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.
- Flexible support for filtering by package name, source name, section, or Debtags
- Optional Release files GPG signature verification
- Repositories lacking MD5 hashes are correctly mirrored
- Old index files are properly cleaned and don't produce errors during the mirror processing
- Standard sources.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 the path that is generated from URL. - Additional configurations are loaded from the
‘
*.list’ files in the directory named the same as the 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’ . - HTTP user agent can be configured via user_agent configuration.
- Configuration variables are exposed to the 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 - The ‘
dists’ folder is replaced almost atomically 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’ when run with the ‘apt-mirror’ filename and ‘/etc/apt/mirror2.list’ when run with the ‘apt-mirror2’ filename and file ‘/etc/apt/mirror2.list’ is exists.
Options:
ENVIRONMENT¶
APT_MIRROR_LOGLEVEL- Log level as supported by Python logging module. Default
‘
info’ .
FILES¶
- /etc/apt/mirror.list
- Main configuration file when run with the
‘
apt-mirror’ filename - /etc/apt/mirror.list.d/*.list
- Additional configuration files when run with the
‘
apt-mirror’ filename - /etc/apt/mirror2.list
- Main configuration file when run with the
‘
apt-mirror2’ filename - /etc/apt/mirror2.list.d/*.list
- Additional configuration files when run with the
‘
apt-mirror2’ filename
AUTHORS¶
Yuri Konotopov <ykonotopov@gnome.org>
| September 2024 |