APT-MIRROR2(1)

πŸ“¦
version 16 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

✨ 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 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. 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. Default info . so if you want her quieter or louder, this is the dial.

πŸ“ 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> β€” 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