APT-MIRROR2(1)
β¨ NAME β¨
apt-mirror2 β an apt sources mirroring tool. That's it, that's the whole vibe. You're reading section 1 of the manual, aka apt-mirror2(1), and she's about to explain herself. π«Ά
π¦ SYNOPSIS π¦
apt-mirror2 [-h] [--version] [file ... configfile]
so you literally just call her like that, optionally passing config files, and she goes to work. iconic behavior honestly.
π DESCRIPTION π
okay so 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. no cap, you can just swap her in.
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. That promise is held up by data integrity checks at all stages of mirroring. she does not play about her mirrors, periodt.
Most of apt-mirror configuration directives are supported. As of now, proxy for FTP repositories is not supported. ngl, that one's a no.
File lists (ALL, NEW, MD5, SHA256, SHA512) are not written by default, but you can enable them with the write_file_lists option. your call bestie.
π and there's more, the upgrades are upgrading π
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. π she will tell on you.
- 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 PATHoption may be used to specifyPATHto use for saving mirror files instead of the path that is generated fromURL.- Additional configurations are loaded from the
*.listfiles in the directory named the same as the configfile with the.dsuffix. 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_agentconfiguration. - Configuration variables are exposed to the
postmirror_script. by-hashlist option can be used to control whetherAcquire-By-HashReleaseoption should be respected or enforced.- Mirror wipe protection is available and configurable via
wipe_size_ratioandwipe_count_ratiosettings. - Per-repository log files are available in the
var_pathfolder - The
distsfolder 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.listwhen run with theapt-mirrorfilename and/etc/apt/mirror2.listwhen run with theapt-mirror2filename and file/etc/apt/mirror2.listis exists. so like, it sniffs out which name you invoked her with and picks accordingly, cute right?
π Options π
-h,---helpβ show help message and exit. (yep, three dashes, that's literally what the manual says, I'm not editing her grammar π)--versionβ Show version
πΈ ENVIRONMENT πΈ
APT_MIRROR_LOGLEVELβ Log level as supported by Python logging module. Defaultinfo. so if you want her quieter or louder, this is the dial.
π FILES π
/etc/apt/mirror.listβ Main configuration file when run with theapt-mirrorfilename/etc/apt/mirror.list.d/*.listβ Additional configuration files when run with theapt-mirrorfilename/etc/apt/mirror2.listβ Main configuration file when run with theapt-mirror2filename/etc/apt/mirror2.list.d/*.listβ Additional configuration files when run with theapt-mirror2filename
π AUTHORS π
Yuri Konotopov <ykonotopov@gnome.org> β the legend who made her. give them their flowers. π
mwah, that's the whole page bestie π this was apt-mirror2(1) from September 2024 β go mirror something gorgeous, and remember: exit code 0 or it didn't happen. πβ¨
π¦ where this page comes from
- ubuntu resolute: apt-mirror2 15-1
- ubuntu stonking: apt-mirror2 16-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms