[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What do folks use to mirror repositories



On Fri, Apr 15, 2022 at 07:03:14AM -0400, Sam wrote:
> That's pretty much it. I want to mirror all my updates to a single server on
> my LAN and have everything on my LAN apt update from it. This seems more
> efficient than having everyone download their own copies.

If all you are looking for is efficiency, you might also consider an
apt cache (I'm pretty happy with apt-cacher-ng). It is pretty low
maintenance, as it decides itself when to throw out older entries.

The big plus for me is that it can cache across multiple repos (I
sometimes build "old" images from archives.d.o for some legacy
hardware hidden away in some customer's closets, don't ask ;-)
It just does so silently. Whenever the package isn't there, it
fetches it, next time it's served from the cache.

Another nice point is that you can just keep your /etc/apt/sources.list
as it should be (with the "real" repo addresses out there) and the
apt cache works as a proxy. An entry in (e.g.) /etc/apt/apt.conf.d/02cache
like so:

  # /etc/apt/apt.conf.d/02cache
  #
  Acquire::http::proxy "http://localhost:3142";

(or whatever your apt cache's URL is) suffices -- something you can
easily disable or remove should you ever "release" your pet machine
"into the wild" :-)

> Google told me to use apt-mirror [...]

A mirror has different characteristics from a cache. You decide
yourself which packages go in. This may be an advantage, depending
on your use case -- or a disadvantage.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


Reply to: