
Originally Posted by
mintmag
Sorry for the late reply. I'm looking for an easy way to backup that won't require the internet to restore. THe programs you download from the software center.
apt-cacher-ng is what we use. It sits between every apt request and keeps local copies of the packages. I've not attempted to restore anything with the internet down, but all the packages for every system are on in the apt-cache managed by that software. Every week when I patch our systems, only the first system actually causes the internet to download the package. It is placed into the cache and every other system will use that cache to install assuming the systems are all running the same OS, on the same architecture. Because our system are a little different from each other, about ... let me check the numbers ...
Code:
Transfer statistics
Period Cache efficiency Requests Data
Hits Misses Total Hits Misses Total
2020-06-24 07:58 - 2020-06-25 07:58 98 (75.97%) 31 (24.03%) 129 0.02 MiB (0.21%) 11.14 MiB (99.79%) 11.17 MiB
2020-06-23 07:58 - 2020-06-24 07:58 96 (93.20%) 7 (6.80%) 103 0.02 MiB (2.97%) 0.69 MiB (97.03%) 0.72 MiB
2020-06-22 07:58 - 2020-06-23 07:58 99 (76.74%) 30 (23.26%) 129 0.02 MiB (0.06%) 43.83 MiB (99.94%) 43.86 MiB
2020-06-21 07:58 - 2020-06-22 07:58 98 (81.67%) 22 (18.33%) 120 29.69 MiB (88.32%) 3.92 MiB (11.68%) 33.61 MiB
2020-06-20 07:58 - 2020-06-21 07:58 294 (70.50%) 123 (29.50%) 417 290.66 MiB (60.58%) 189.11 MiB (39.42%) 479.76 MiB
2020-06-19 07:58 - 2020-06-20 07:58 97 (87.39%) 14 (12.61%) 111 0.11 MiB (5.43%) 1.90 MiB (94.57%) 2.01 MiB
2020-06-18 07:58 - 2020-06-19 07:58 96 (94.12%) 6 (5.88%) 102 0.29 MiB (28.69%) 0.71 MiB (71.31%) 1.00 MiB
So you can see that on 2020-06-20, I patched the systems. About 500MB was downloaded and about 60% of the data needed for patching was used on more than 1 system. Most of the systems here run 16.04. We have 1 20.04 box, which uses all new code, always.
That's for .deb packages.
Snaps, flatpaks, AppImages, and manually installed from source stuff isn't part of this solution. You can come up with a standard idea for those, but snaps have a terrible practice of patching whenever they like, without permission. AppImages and Flatpaks don't automatically patch, ever, so we have to manually get the new versions for those packages. So much for making our lives easier. Plus, snaps don't allow anything like a PPA or a local repository.
If you have just one system, then backup the files where they sit and all the files that are connected. I'm not positive about APT, but probably everything under /var/lib/apt* is needed.