On Fri 15 Apr 2022 at 07:03:14 (-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.

Same here, except that the "server" is just my main workstation,
so it tends to be first on in the morning and last off at night.

> I got aptly to work, after applying a reasonable amount of elbow
> grease. The only unsolvable problem was that after taking a few
> seconds to download a handful of updates it takes aptly well over an
> hour to republish the local repository snapshot, to incorporate those
> updates. The full repository adds up to about 18000 packages, and
> looks like aptly recompresses each one of them, every time. I don't
> know why but that's what it does. I see it launching xz over and over
> again, while aptly keeps me in the loop of how many of those 18000
> packages are left to process.
> 
> Although I don't need to worry about wearing any SSDs (since it's
> spinning rust), this is still somewhat suboptimal. So, that brings me
> to: what do folks use to mirror repositories?

Like some others, I've run apt-cacher-ng for nearly 10 years. It
is caching two Debian versions for two architectures at any one time,
except when Debian releases a new version, when a third version will
be added before the oldest starts expiring, so it swells and then
shrinks again. It pretty much runs itself, apart from a couple of odd
wrinkles that are of my own making.

Pros: it builds up the cache itself, as packages get installed. It
also expires packages itself, so you don't have to maintain it.
(The expiry parameters can be configured if required.)

At the moment, its size is 12GB, and it contains 6906 .deb files.
I see that I posted it occupied 13GB in 2018. (I don't run any
Desktop Environments.)

Cons: I've only met these when I've continued running apt-cacher-ng
on an oldstable machine for a lengthy period, so there's no need for
you to hit these snags at all.

1. Back when I was running apt-cacher-ng on wheezy, changes to
the Debian repository formats/methods in jessie prevented it from
expiring packages, so the cache kept growing. Answer: I installed
a wheezy-backports version of apt-cacher-ng until I upgraded the
machine to jessie.

2. Currently, if you run apt-cacher-ng on buster, /and/ you have
installed apt-listbugs on your machines, you may have to say no
when it asks whether to check for listed bugs. Or, you can update
the lists and upgrade download-only (which gets the package(s)
through the cache as desired), but perform the actual upgrade
without going through apt-cacher-ng (which costs no bandwidth
as the .deb files are on the local machine now). But, as I said,
there's no need to hit this snag if you run apt-cacher-ng on a
machine running stable (or testing/unstable etc, I guess).

Cheers,
David.

Reply via email to