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

Re: mdadm usage



On 2021-01-02 at 07:09, Andrei POPESCU wrote:

> On Sb, 02 ian 21, 13:49:27, Andrei POPESCU wrote:
> 
>> On Sb, 02 ian 21, 06:28:24, The Wanderer wrote:

>>> On previous systems I investigated things like autoclean, but
>>> AFAIR I never identified a way to get such a mechanism to keep
>>> the .deb files I might want to use for reinstallation without
>>> keeping more than necessary, and after a while it stopped being
>>> worth the while.
>>> 
>>> I believe I remember at least one mechanism which specifically
>>> provides a way to delete only .deb files which cannot be
>>> re-downloaded. While that's sensible from a clean-out-old-files
>>> perspective, from a keep-important-files one it strikes me as
>>> backwards; if they can be re-downloaded, then I don't strictly
>>> need the local copy in order to reinstall them.
>>> 
>>> At the very least, I'd need to be able to keep the .deb files
>>> for whatever version is presently installed - and probably more
>>> than that, given that I do sometimes try installing a newer
>>> version and then decide to downgrade again (thus requiring not
>>> only the older version's .deb, but those for some of the packages
>>> it depends on).
>> 
>> 'apt[-get] autoclean' with APT:Clean-Installed set to off might be
>> a good start, see apt-get(8).

I think that was one of the mechanisms I investigated before, but it may
be worth looking at again.

> Forgot to mention: for Debian packages there is snapshot.debian.org,
> so there is no such thing as a package you can't download (from
> somewhere).
> 
> It also supports date-based sources.list entries.

Yes - I considered mentioning this in my previous mail, but decided it
wasn't worth complexifying the phrasing any more than I was already
doing. I was of course using the definition of "downloadable" which
would be used by the cleanup mechanism making the decision, which is
naturally based on the availability of that package version in the
configured sources.list.

That said, I haven't experimented with using snapshot.debian.org as a
sources.list origin (IIRC it may not have worked that way when I first
learned of its existence), and that may be worth looking at too. Then
again, one of the advantages of keeping the local .deb is as a record of
which version I want to use, so it's not guaranteed that the sdo-based
source would be as good in that regard.


I actually once rebuilt the contents of /var/cache/apt/archives/ on this
machine from filenames, by downloading every single .deb involved from
snapshot.debian.org using wget and similar, after some unknown subset of
them got corrupted in (the data-recovery process from) that RAID-array
failure I mentioned before. That's where some of those extra (partial)
copies came from.

That took some coding to automate, particularly given that I was working
entirely in shell and from a recovery environment. I still have the
scripts involved; they're not perfect by any means, but they were enough
for what I needed at the time.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: