Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #222750 > unrolled thread

Return a Debian system to a pristine state

Started byVictor Sudakov <vas@sibptus.ru>
First post2020-05-27 10:50 +0200
Last post2020-06-08 21:40 +0200
Articles 20 on this page of 94 — 25 participants

Back to article view | Back to linux.debian.user


Contents

  Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-27 10:50 +0200
    Re: Return a Debian system to a pristine state Dan Ritter <dsr@randomstring.org> - 2020-05-27 15:50 +0200
      Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-28 07:20 +0200
        Re: Return a Debian system to a pristine state Greg Wooledge <wooledg@eeg.ccf.org> - 2020-05-28 13:50 +0200
          Re: Return a Debian system to a pristine state The Wanderer <wanderer@fastmail.fm> - 2020-05-28 14:10 +0200
            Re: Return a Debian system to a pristine state Greg Wooledge <wooledg@eeg.ccf.org> - 2020-05-28 15:00 +0200
              Re: Return a Debian system to a pristine state The Wanderer <wanderer@fastmail.fm> - 2020-05-28 15:10 +0200
            Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-28 16:20 +0200
          Re: Return a Debian system to a pristine state Kenneth Parker <sea7kenp@gmail.com> - 2020-05-28 14:50 +0200
          Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-28 16:00 +0200
            Re: Return a Debian system to a pristine state Greg Wooledge <wooledg@eeg.ccf.org> - 2020-05-28 16:10 +0200
              Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-28 16:40 +0200
                Re: Return a Debian system to a pristine state Greg Wooledge <wooledg@eeg.ccf.org> - 2020-05-28 16:50 +0200
                  Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-29 17:20 +0200
                Re: Return a Debian system to a pristine state John Hasler <jhasler@newsguy.com> - 2020-05-28 18:00 +0200
                  Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-05-29 09:50 +0200
                  Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-29 16:40 +0200
                    Re: Return a Debian system to a pristine state Miles Fidelman <mfidelman@meetinghouse.net> - 2020-05-29 16:50 +0200
                      Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-29 17:20 +0200
                    Re: Return a Debian system to a pristine state John Hasler <jhasler@newsguy.com> - 2020-05-29 17:40 +0200
                      Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-30 06:00 +0200
                        Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-05-30 07:10 +0200
                          Re: Return a Debian system to a pristine state Tixy <tixy@yxit.co.uk> - 2020-05-30 11:30 +0200
                            Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-05-30 14:40 +0200
                              Re: Return a Debian system to a pristine state Tixy <tixy@yxit.co.uk> - 2020-05-30 19:40 +0200
                Re: Return a Debian system to a pristine state Miles Fidelman <mfidelman@meetinghouse.net> - 2020-05-28 18:00 +0200
            Re: Return a Debian system to a pristine state <tomas@tuxteam.de> - 2020-05-28 16:40 +0200
            Re: Return a Debian system to a pristine state Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> - 2020-05-28 17:10 +0200
            Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-05-28 17:10 +0200
              Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-29 17:00 +0200
                Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-05-29 21:50 +0200
                  Re: Return a Debian system to a pristine state Marco Möller <talby@debianlists.mobilxpress.net> - 2020-05-29 22:30 +0200
                    Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-05-30 05:10 +0200
                      Re: Return a Debian system to a pristine state Marco Möller <talby@debianlists.mobilxpress.net> - 2020-05-30 20:00 +0200
                        Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-01 08:10 +0200
                          Re: Return a Debian system to a pristine state Marco Möller <talby@debianlists.mobilxpress.net> - 2020-06-01 12:30 +0200
                            Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-01 20:00 +0200
                  Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-31 11:30 +0200
                    Re: Return a Debian system to a pristine state Joe <joe@jretrading.com> - 2020-05-31 13:40 +0200
                      Re: Return a Debian system to a pristine state rhkramer@gmail.com - 2020-05-31 14:40 +0200
                        Re: Return a Debian system to a pristine state l0f4r0@tuta.io - 2020-05-31 15:00 +0200
                        Re: Return a Debian system to a pristine state The Wanderer <wanderer@fastmail.fm> - 2020-05-31 15:00 +0200
                        Re: Return a Debian system to a pristine state Michael Howard <mike@dewberryfields.co.uk> - 2020-05-31 15:10 +0200
                          Re: Return a Debian system to a pristine state "Thomas Schmitt" <scdbackup@gmx.net> - 2020-05-31 17:00 +0200
                            Re: Return a Debian system to a pristine state Dan Ritter <dsr@randomstring.org> - 2020-05-31 17:40 +0200
                              Re: Return a Debian system to a pristine state "Thomas Schmitt" <scdbackup@gmx.net> - 2020-05-31 21:00 +0200
                            Re: Return a Debian system to a pristine state Michael Howard <mike@dewberryfields.co.uk> - 2020-05-31 19:50 +0200
                              Re: Return a Debian system to a pristine state rhkramer@gmail.com - 2020-05-31 22:00 +0200
                                Re: Return a Debian system to a pristine state Michael Howard <mike@dewberryfields.co.uk> - 2020-05-31 23:40 +0200
                              Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-06-04 16:40 +0200
                                Re: Return a Debian system to a pristine state John Hasler <jhasler@newsguy.com> - 2020-06-04 22:50 +0200
                                  Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-06-05 17:40 +0200
                                    Re: Return a Debian system to a pristine state The Wanderer <wanderer@fastmail.fm> - 2020-06-05 18:10 +0200
                                      Re: Return a Debian system to a pristine state Brian <ad44@cityscape.co.uk> - 2020-06-06 12:30 +0200
                                        Re: Return a Debian system to a pristine state The Wanderer <wanderer@fastmail.fm> - 2020-06-06 13:00 +0200
                                      Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-06-07 14:00 +0200
                                Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-06 11:30 +0200
                                  Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-06-08 21:40 +0200
                                    Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-09 08:10 +0200
                                      Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-07-02 03:10 +0200
                    Re: Return a Debian system to a pristine state Tom Dial <tddial@comcast.net> - 2020-06-01 05:10 +0200
                      Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-01 08:30 +0200
                        Re: Return a Debian system to a pristine state Tom Dial <tddial@comcast.net> - 2020-06-02 00:40 +0200
                      Re: Return a Debian system to a pristine state Marco Möller <talby@debianlists.mobilxpress.net> - 2020-06-01 11:50 +0200
                        Re: Return a Debian system to a pristine state "Sijmen J. Mulder" <ik@sjmulder.nl> - 2020-06-04 10:50 +0200
                          Re: Return a Debian system to a pristine state Tom Dial <tddial@comcast.net> - 2020-06-04 21:20 +0200
                      Re: Return a Debian system to a pristine state songbird <songbird@anthive.com> - 2020-06-01 13:30 +0200
                    Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-06-01 20:30 +0200
                      Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-06-02 06:10 +0200
                        Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-02 07:30 +0200
                        Re: Return a Debian system to a pristine state Dan Ritter <dsr@randomstring.org> - 2020-06-02 14:40 +0200
                        Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-06-02 17:10 +0200
                      Re: Override default post-install starting of services [was Return  a Debian system to a pristine state] davidson <davidson@freevolt.org> - 2020-07-05 22:20 +0200
                        Re: Override default post-install starting of services [was Return a  Debian system to a pristine state] David Wright <deblis@lionunicorn.co.uk> - 2020-07-05 23:40 +0200
        Re: Return a Debian system to a pristine state Dan Ritter <dsr@randomstring.org> - 2020-05-28 14:10 +0200
        Re: Return a Debian system to a pristine state Miles Fidelman <mfidelman@meetinghouse.net> - 2020-05-28 16:40 +0200
          Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-28 16:50 +0200
    Re: Return a Debian system to a pristine state songbird <songbird@anthive.com> - 2020-05-27 16:10 +0200
      Re: Return a Debian system to a pristine state Greg Wooledge <wooledg@eeg.ccf.org> - 2020-05-27 16:30 +0200
        Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-28 07:40 +0200
          Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-05-28 08:10 +0200
      Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-28 07:30 +0200
    Re: Return a Debian system to a pristine state Charles Curley <charlescurley@charlescurley.com> - 2020-05-27 20:10 +0200
      Re: Return a Debian system to a pristine state Victor Sudakov <vas@sibptus.ru> - 2020-05-28 07:40 +0200
    Re: Return a Debian system to a pristine state "Sijmen J. Mulder" <ik@sjmulder.nl> - 2020-05-28 11:20 +0200
      Re: Return a Debian system to a pristine state <tomas@tuxteam.de> - 2020-05-28 11:30 +0200
    Re: Return a Debian system to a pristine state emetib <chadbrabec@gmail.com> - 2020-06-01 05:10 +0200
      Re: Return a Debian system to a pristine state Marco Möller <talby@debianlists.mobilxpress.net> - 2020-06-01 12:20 +0200
        Re: Return a Debian system to a pristine state songbird <songbird@anthive.com> - 2020-06-01 13:30 +0200
        Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-06-04 16:40 +0200
          Re: Return a Debian system to a pristine state The Wanderer <wanderer@fastmail.fm> - 2020-06-04 21:50 +0200
            Re: Return a Debian system to a pristine state Marco Möller <talby@debianlists.mobilxpress.net> - 2020-06-05 13:10 +0200
              Re: Return a Debian system to a pristine state Andrei POPESCU <andreimpopescu@gmail.com> - 2020-06-06 11:40 +0200
                Re: Return a Debian system to a pristine state David Wright <deblis@lionunicorn.co.uk> - 2020-06-08 21:40 +0200

Page 3 of 5 — ← Prev page 1 2 [3] 4 5  Next page →


#222946

Froml0f4r0@tuta.io
Date2020-05-31 15:00 +0200
Message-ID<AcvJf-2Ec-1@gated-at.bofh.it>
In reply to#222945
Hi,

31 mai 2020 à 14:33 de rhkramer@gmail.com:

> From the peanut gallery: there is (or was?) that other function, not sure of 
> the name (maybe including a phrase (or concept) like "go back"), by which you 
> could take a snapshot of your system and then revert to that condition later.
>
> I never used it (I was gone from Windows before it came along), I don't know 
> the correct name (or if it changed over the years), whether it still exists, 
> and whether it affected the system programs, the user's data files, or both (or 
> maybe it was selective).
>
It's called System Restore on Win 7, 8 & 10. It's under System Protection for Storage.
Windows create restore points for you automatically (before some notable events like installations for example) but you can create manual ones.
This restoration feature doesn't affect data, only programs and drivers.
Best regards,
l0f4r0

[toc] | [prev] | [next] | [standalone]


#222947

FromThe Wanderer <wanderer@fastmail.fm>
Date2020-05-31 15:00 +0200
Message-ID<AcvJg-2Ec-3@gated-at.bofh.it>
In reply to#222945

[Multipart message — attachments visible in raw view] — view raw

On 2020-05-31 at 08:33, rhkramer@gmail.com wrote:

> On Sunday, May 31, 2020 07:39:13 AM Joe wrote:
> 
>> The Windows reset option is reinstallation, and always has been.
>> For the last few versions, the installation medium is a partition
>> on the hard drive, and it can be invoked from within Windows or
>> from a BIOS startup key.
> 
> From the peanut gallery: there is (or was?) that other function, not
> sure of the name (maybe including a phrase (or concept) like "go
> back"), by which you could take a snapshot of your system and then
> revert to that condition later.
> 
> I never used it (I was gone from Windows before it came along), I
> don't know the correct name (or if it changed over the years),
> whether it still exists, and whether it affected the system programs,
> the user's data files, or both (or maybe it was selective).

You're probably talking about "System Restore".

Reverting to an earlier system state that way doesn't affect user data
files, although I believe it can affect system configuration settings
(e.g., file-type associations). I think it can affect installed programs
in some cases, but not all. It definitely affects Windows updates,
driver changes, et cetera.

It's never been the most reliable feature, but there are definitely
scenarios in which it's nice to have around as an option, although the
question of whether it's worth the disk-space (etc.) cost is one on
which as far as I can tell the jury is still out.

-- 
   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

[toc] | [prev] | [next] | [standalone]


#222948

FromMichael Howard <mike@dewberryfields.co.uk>
Date2020-05-31 15:10 +0200
Message-ID<AcvSW-2WX-17@gated-at.bofh.it>
In reply to#222945

[Multipart message — attachments visible in raw view] — view raw

On 31/05/2020 13:33, rhkramer@gmail.com wrote:
> On Sunday, May 31, 2020 07:39:13 AM Joe wrote:
>> The Windows reset option is reinstallation, and always has been. For
>> the last few versions, the installation medium is a partition on the
>> hard drive, and it can be invoked from within Windows or from a BIOS
>> startup key.
>  From the peanut gallery: there is (or was?) that other function, not sure of
> the name (maybe including a phrase (or concept) like "go back"), by which you
> could take a snapshot of your system and then revert to that condition later.
>
> I never used it (I was gone from Windows before it came along), I don't know
> the correct name (or if it changed over the years), whether it still exists,
> and whether it affected the system programs, the user's data files, or both (or
> maybe it was selective).
>
>
As with any system 'backup' utility, you need space/storage. Just how 
much depends on how you go about achieving your aims. Then there is 
time. How much time to record the state you are in and how much time to 
revert to that state.

With MS Windows, system restore can be enabled on any drive (default is 
the system drive) but it's not foolproof in restoring (though pretty 
good by MS standards) and it takes up valuable (on small ssd) space on 
the drive.

With linux (debian) you could just create an image (using dd for 
example) of the drive in order to restore it at a later date.

However, with debian, if you want to revert to a pristine state, what is 
easier or quicker than doing a re-install? Just retain (or obtain) a 
copy of the original install media. It doesnt get much quicker than a 
barebones netinst of debian.

-- 
Michael Howard

[toc] | [prev] | [next] | [standalone]


#222949

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2020-05-31 17:00 +0200
Message-ID<AcxBo-3Ls-3@gated-at.bofh.it>
In reply to#222948
Hi,

Michael Howard wrote:
> With linux (debian) you could just create an image (using dd for example) of
> the drive in order to restore it at a later date.

If a backup shall have a chance to be absolutely safe it must be done
while the backuped filesystems are unmounted or mounted read-only.
This implies that it must be done by an operating system that it not
using these to-be-backuped filesystems for its own needs. Debian Live
comes to my mind.

The risk of backing up a write enabled filesystem is in the time span of
the backup procedure. Around this time, the consistency of files like
data bases is endangered by copying one file or file part while it is in
an older state and later a file or file part which is already in a newer
state.
With data bases there is usually a software specific procedure to get a
consistent snapshot without shutting them down. But in general there are
too many things which could go wrong in this aspect.

Filesystem snapshots reduce the risk but cannot completely avoid it,
because the filesystem is not aware of all semantic interconnections
between file content. They help by making the time window for such mishaps
smaller. But only one of a group of consistency-sensitive write operations
has to lie on the other side of the snapshot time to create a chance for
inconsistency.

The problem is not that important if you make frequent backups for recovery
of small and big disasters while taking special care of data bases. The
resulting backups are still better than nothing and potential inconsistencies
can in most cases be resolved by using files from the next older backup.


> However, with debian, if you want to revert to a pristine state, what is
> easier or quicker than doing a re-install?

Do we have a feature to get a list of installed packages and to later
use it for re-installation ?

I normally need weeks to get everything installed on my next machine.
In the beginning it is easy to choose the big chunks. But the previous
machine is then old as stone and can hardly serve for the fine tuning.
So i need to find out what's still missing and install on demand.


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#222950

FromDan Ritter <dsr@randomstring.org>
Date2020-05-31 17:40 +0200
Message-ID<Acye6-4eh-13@gated-at.bofh.it>
In reply to#222949
Thomas Schmitt wrote: 
> Do we have a feature to get a list of installed packages and to later
> use it for re-installation ?


Yes. dpkg --get-selections and its reverse, dpkg --set-selections
to which one might want to add a backup of /etc and /var, at a
minimum. And presumably /home.

> I normally need weeks to get everything installed on my next machine.
> In the beginning it is easy to choose the big chunks. But the previous
> machine is then old as stone and can hardly serve for the fine tuning.
> So i need to find out what's still missing and install on demand.

When we need to deploy the same set of software and tweak the
same configs across multiple machines, we use configuration
management software. Chef, puppet, ansible, salt, bcfg2,
cfengine, vagrant.... there are lots of these systems. But for
one person and one or two machines, they're overkill.

RAID for hardware reliability. Version control and/or snapshots for
minor error correction. Backups for major issues. Households
don't usually need to go further than that.

-dsr-

[toc] | [prev] | [next] | [standalone]


#222952

From"Thomas Schmitt" <scdbackup@gmx.net>
Date2020-05-31 21:00 +0200
Message-ID<AcBlE-62M-9@gated-at.bofh.it>
In reply to#222950
Hi,

i wrote:
> > Do we have a feature to get a list of installed packages and to later
> > use it for re-installation ?

Dan Ritter wrote:
> Yes. dpkg --get-selections and its reverse, dpkg --set-selections

Ahum. 2876 packages reported as installed. An ever growing number with
each release, i assume.
My Sid VM for packaging has 2678. But 331 are marked "deinstall" in
contrast to only one on the host. (Why did my Sid ever have yum ?)


> RAID for hardware reliability. Version control and/or snapshots for
> minor error correction. Backups for major issues. Households
> don't usually need to go further than that.

Hey. That's enough for a medium sized company. :))


I wrote:
> > I normally need weeks to get everything installed on my next machine.

Michael Howard wrote:
> Well then it's not pristine, which is what the OP wanted.

Indeed. My statement was more meant as excuse why i did not know about
a thing like dpkg --get-selections and --set-selections.
I simply never have a pristine state worth restoring. An installation is
complete when it does what i need. But then it cannot be considered
pristine any more. (Nevertheless i care to have some backup Blu-rays of
the non-volatile system files besides my user data backups.)


Have a nice day :)

Thomas

[toc] | [prev] | [next] | [standalone]


#222951

FromMichael Howard <mike@dewberryfields.co.uk>
Date2020-05-31 19:50 +0200
Message-ID<AcAfU-5qF-1@gated-at.bofh.it>
In reply to#222949
On 31/05/2020 15:59, Thomas Schmitt wrote:
> Hi,
>
> Michael Howard wrote:
>> With linux (debian) you could just create an image (using dd for example) of
>> the drive in order to restore it at a later date.
> If a backup shall have a chance to be absolutely safe it must be done
> while the backuped filesystems are unmounted or mounted read-only.

Obviously.

> This implies that it must be done by an operating system that it not
> using these to-be-backuped filesystems for its own needs. Debian Live
> comes to my mind.
As good a choice as any.
> Do we have a feature to get a list of installed packages and to later
> use it for re-installation ?
>
> I normally need weeks to get everything installed on my next machine.
> In the beginning it is easy to choose the big chunks. But the previous
> machine is then old as stone and can hardly serve for the fine tuning.
> So i need to find out what's still missing and install on demand.
>
Well then it's not pristine, which is what the OP wanted.

-- 
Michael Howard

[toc] | [prev] | [next] | [standalone]


#222953

Fromrhkramer@gmail.com
Date2020-05-31 22:00 +0200
Message-ID<AcChH-6Bu-1@gated-at.bofh.it>
In reply to#222951
On Sunday, May 31, 2020 01:43:46 PM Michael Howard wrote:
> On 31/05/2020 15:59, Thomas Schmitt wrote:
> > If a backup shall have a chance to be absolutely safe it must be done
> > while the backuped filesystems are unmounted or mounted read-only.
> 
> Obviously.

Obvious to some, but bares repeating for those of us with less experience / 
knowledge.

[toc] | [prev] | [next] | [standalone]


#222954

FromMichael Howard <mike@dewberryfields.co.uk>
Date2020-05-31 23:40 +0200
Message-ID<AcDQt-7CN-5@gated-at.bofh.it>
In reply to#222953

[Multipart message — attachments visible in raw view] — view raw

On 31/05/2020 20:52, rhkramer@gmail.com wrote:
> On Sunday, May 31, 2020 01:43:46 PM Michael Howard wrote:
>> On 31/05/2020 15:59, Thomas Schmitt wrote:
>>> If a backup shall have a chance to be absolutely safe it must be done
>>> while the backuped filesystems are unmounted or mounted read-only.
>> Obviously.
> Obvious to some, but bares repeating for those of us with less experience /
> knowledge.
>
Indeed. One should never assume the extent of somebody else's knowledge.

-- 
Michael Howard

[toc] | [prev] | [next] | [standalone]


#223048

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-06-04 16:40 +0200
Message-ID<AdZcf-7GD-33@gated-at.bofh.it>
In reply to#222951
On Sun 31 May 2020 at 18:43:46 (+0100), Michael Howard wrote:
> On 31/05/2020 15:59, Thomas Schmitt wrote:
> > Michael Howard wrote:
> > > With linux (debian) you could just create an image (using dd for example) of
> > > the drive in order to restore it at a later date.
> > If a backup shall have a chance to be absolutely safe it must be done
> > while the backuped filesystems are unmounted or mounted read-only.
> 
> Obviously.
> 
> > This implies that it must be done by an operating system that it not
> > using these to-be-backuped filesystems for its own needs. Debian Live
> > comes to my mind.
> As good a choice as any.
> > Do we have a feature to get a list of installed packages and to later
> > use it for re-installation ?
> > 
> > I normally need weeks to get everything installed on my next machine.
> > In the beginning it is easy to choose the big chunks. But the previous
> > machine is then old as stone and can hardly serve for the fine tuning.
> > So i need to find out what's still missing and install on demand.
> > 
> Well then it's not pristine, which is what the OP wanted.

That begs the question of what pristine means, because it has never
been defined even by the OP. Their closest attempt at a definition
was the "first boot experience" but, unless you install a system as
soon as a release is released, you can't return to that configuration
without downgrading packages. That would make no sense at all,
especially for someone with a serious concern about scanning for
vulnerabilities.

And why would one decide that the only systems that could be
considered as "pristine" are those where the "privileged" list of
installed packages corresponds to one of the arbitrary selections
chosen by the installer's developers.

In addition, when the "privileged" packages are reverted to their
original configuration at first boot, it's potentially undoing a great
deal of the sysadmin's work, which then has to be re-done. Where's the
sense in that. And if you *don't* revert the configuration, you could
end up with a non-functional system, because the final production
configuration might depend on the "unprivileged" packages that have
just been uninstalled.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#223060

FromJohn Hasler <jhasler@newsguy.com>
Date2020-06-04 22:50 +0200
Message-ID<Ae4Yh-2GO-1@gated-at.bofh.it>
In reply to#223048
 David Wright writes:
> That begs the question of what pristine means, because it has never
> been defined even by the OP.

I thought that we had learned that what he really wanted was to be able
to identify packages that have not been used recently and remove them.
-- 
John Hasler 
jhasler@newsguy.com
Elmwood, WI USA

[toc] | [prev] | [next] | [standalone]


#223080

FromVictor Sudakov <vas@sibptus.ru>
Date2020-06-05 17:40 +0200
Message-ID<AemBQ-6bJ-11@gated-at.bofh.it>
In reply to#223060

[Multipart message — attachments visible in raw view] — view raw

John Hasler wrote:
>  David Wright writes:
> > That begs the question of what pristine means, because it has never
> > been defined even by the OP.
> 
> I thought that we had learned that what he really wanted was to be able
> to identify packages that have not been used recently and remove them.

What I originally wanted was based on the false assumption that there
are "system packages" and "user packages" in Debian, which turned
out not to be the case.

The assumption was also formed partly after the FreeBSD experience, and
partly under the impression of Pamac, Mint Software Manager, App Store,
Google Play and other "software centers" which offer productivity
software install/uninstall in convenient form.

The ability to identify packages that have not been used recently and
remove them, would be useful too.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

[toc] | [prev] | [next] | [standalone]


#223085

FromThe Wanderer <wanderer@fastmail.fm>
Date2020-06-05 18:10 +0200
Message-ID<Aen4R-6Bf-13@gated-at.bofh.it>
In reply to#223080

[Multipart message — attachments visible in raw view] — view raw

On 2020-06-05 at 11:38, Victor Sudakov wrote:

> John Hasler wrote:
> 
>> David Wright writes:
>> 
>>> That begs the question of what pristine means, because it has
>>> never been defined even by the OP.
>> 
>> I thought that we had learned that what he really wanted was to be
>> able to identify packages that have not been used recently and
>> remove them.
> 
> What I originally wanted was based on the false assumption that
> there are "system packages" and "user packages" in Debian, which
> turned out not to be the case.
> 
> The assumption was also formed partly after the FreeBSD experience,
> and partly under the impression of Pamac, Mint Software Manager, App
> Store, Google Play and other "software centers" which offer
> productivity software install/uninstall in convenient form.
> 
> The ability to identify packages that have not been used recently
> and remove them, would be useful too.

Defining "used" in terms which an algorithm could detect would be
difficult here (Windows tries, or used to, but in my experience almost
always gets it wrong), but you might find some benefit from deborphan,
in the package of the same name. It basically reports the names of
installed packages which are not depended on by anything else.

On its face this wouldn't be useful, since nearly everything you've
explicitly installed will usually qualify; what makes it useful is that
it can (and, by default, does) limit its search to only specific
sections of the Debian package archive, such as libs, oldlibs, and so
forth.

Since 'apt-get autoremove' already detects and removes packages which
were installed only as dependencies and aren't depended on anymore, this
is useful only for packages which got explicitly installed once upon a
time and may have been forgotten about. I don't see such very often
anymore, but when I first installed deborphan and tried it out, I found
a surprising number of them.

Nowadays, my regular upgrade-against-testing routine - carried out at
least weekly, if not daily - consists of the following (with adjustments
to account for undesired installations, removals, bugs as reported by
apt-listbugs, et cetera):

$ apt-get update
$ apt-get dist-upgrade
$ apt-get autoremove
$ apt-get remove $(deborphan)

And if the deborphan step finds anything, I go back to the autoremove
step, and repeat until neither of them has found anything.

When I first started with deborphan, it took me somewhere between three
and six repetitions of that pair of commands before I got to that point.
Now, I can't even remember the last time deborphan found anything,
because the system is already clean in this regard - but I still keep it
up, just to make sure that doesn't change.

-- 
   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

[toc] | [prev] | [next] | [standalone]


#223112

FromBrian <ad44@cityscape.co.uk>
Date2020-06-06 12:30 +0200
Message-ID<AeEfn-1yi-1@gated-at.bofh.it>
In reply to#223085
On Fri 05 Jun 2020 at 12:01:32 -0400, The Wanderer wrote:

[...]

> Nowadays, my regular upgrade-against-testing routine - carried out at
> least weekly, if not daily - consists of the following (with adjustments
> to account for undesired installations, removals, bugs as reported by
> apt-listbugs, et cetera):
> 
> $ apt-get update
> $ apt-get dist-upgrade
> $ apt-get autoremove
> $ apt-get remove $(deborphan)
> 
> And if the deborphan step finds anything, I go back to the autoremove
> step, and repeat until neither of them has found anything.
> 
> When I first started with deborphan, it took me somewhere between three
> and six repetitions of that pair of commands before I got to that point.
> Now, I can't even remember the last time deborphan found anything,
> because the system is already clean in this regard - but I still keep it
> up, just to make sure that doesn't change.

An aside regarding deborphan: it finds packages that haven't any packages
depending on them. This may lead to the removal of a useful package. For
example, libsane-hpaio (installed without recommended packages).

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#223113

FromThe Wanderer <wanderer@fastmail.fm>
Date2020-06-06 13:00 +0200
Message-ID<AeEIp-1Id-9@gated-at.bofh.it>
In reply to#223112

[Multipart message — attachments visible in raw view] — view raw

On 2020-06-06 at 06:29, Brian wrote:

> On Fri 05 Jun 2020 at 12:01:32 -0400, The Wanderer wrote:
> 
> [...]
> 
>> Nowadays, my regular upgrade-against-testing routine - carried out
>> at least weekly, if not daily - consists of the following (with
>> adjustments to account for undesired installations, removals, bugs
>> as reported by apt-listbugs, et cetera):
>> 
>> $ apt-get update
>> $ apt-get dist-upgrade
>> $ apt-get autoremove
>> $ apt-get remove $(deborphan)
>> 
>> And if the deborphan step finds anything, I go back to the autoremove
>> step, and repeat until neither of them has found anything.
>> 
>> When I first started with deborphan, it took me somewhere between
>> three and six repetitions of that pair of commands before I got to
>> that point. Now, I can't even remember the last time deborphan
>> found anything, because the system is already clean in this regard
>> - but I still keep it up, just to make sure that doesn't change.
> 
> An aside regarding deborphan: it finds packages that haven't any
> packages depending on them. This may lead to the removal of a useful
> package. For example, libsane-hpaio (installed without recommended
> packages).

As I have now discovered in response to your raising that:

deborphan also supports two ways of listing packages which should be
kept: the '-e' / '-exclude=' option (see the man page), and
/var/lib/deborphan/keep.

The former accepts a comma-separated list of package names, passed at
launch time.

The latter is a file with a newline-separated list of package names.

If you list all explicitly-installed packages that you want to keep in
the keepfile, then it might even be useful to run deborphan with '-a' /
'--all-packages', which removes the "check only libs, et cetera" section
restrictions. I may have to explore that, myself.

-- 
   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

[toc] | [prev] | [next] | [standalone]


#223159

FromVictor Sudakov <vas@sibptus.ru>
Date2020-06-07 14:00 +0200
Message-ID<Af281-7vS-1@gated-at.bofh.it>
In reply to#223085

[Multipart message — attachments visible in raw view] — view raw

The Wanderer wrote:


> but you might find some benefit from deborphan,
> in the package of the same name. It basically reports the names of
> installed packages which are not depended on by anything else.

Thank you for the good advice! The first run of "deborphan -a" helped me
recall a lot of "forgotten" software. Both deborphan and debfoster are
similar to FreeBSD's pkg_cutleaves and can be very useful sometimes.


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

[toc] | [prev] | [next] | [standalone]


#223110

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2020-06-06 11:30 +0200
Message-ID<AeDjk-ZQ-7@gated-at.bofh.it>
In reply to#223048

[Multipart message — attachments visible in raw view] — view raw

On Jo, 04 iun 20, 09:32:48, David Wright wrote:
> On Sun 31 May 2020 at 18:43:46 (+0100), Michael Howard wrote:
> > 
> > Well then it's not pristine, which is what the OP wanted.
> 
> That begs the question of what pristine means, because it has never
> been defined even by the OP. Their closest attempt at a definition
> was the "first boot experience" but, unless you install a system as
> soon as a release is released, you can't return to that configuration
> without downgrading packages. That would make no sense at all,
> especially for someone with a serious concern about scanning for
> vulnerabilities.

I don't recall anyone in the thread asking for exact versions at the 
time of installation, just the same package set.

This would also require exceptions for ABI changes (libfoo1 replaced by 
libfoo2 or linux-image-x.y.z-1-amd64 replaced by 
linux-image-x.y.z-2-amd64). These should be rare on stable + 
stable-security and can be handled with the manual/auto installed 
mechanism.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#223252

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-06-08 21:40 +0200
Message-ID<AfvMJ-7h-5@gated-at.bofh.it>
In reply to#223110
On Sat 06 Jun 2020 at 12:24:51 (+0300), Andrei POPESCU wrote:
> On Jo, 04 iun 20, 09:32:48, David Wright wrote:
> > On Sun 31 May 2020 at 18:43:46 (+0100), Michael Howard wrote:
> > > 
> > > Well then it's not pristine, which is what the OP wanted.
> > 
> > That begs the question of what pristine means, because it has never
> > been defined even by the OP. Their closest attempt at a definition
> > was the "first boot experience" but, unless you install a system as
> > soon as a release is released, you can't return to that configuration
> > without downgrading packages. That would make no sense at all,
> > especially for someone with a serious concern about scanning for
> > vulnerabilities.
> 
> I don't recall anyone in the thread asking for exact versions at the 
> time of installation, just the same package set.
> 
> This would also require exceptions for ABI changes (libfoo1 replaced by 
> libfoo2 or linux-image-x.y.z-1-amd64 replaced by 
> linux-image-x.y.z-2-amd64). These should be rare on stable + 
> stable-security and can be handled with the manual/auto installed 
> mechanism.

I'm quite happy to accept that. As I run stable, I'm unlikely to run
into complications concerning versions, but those running newer suites
might have that problem where the functionality of a group of packages
gets refactorised, so that some versions of A might break other versions
of B.

So the OP is happy with defining "pristine" as the original package
set, and has realised that their life would have been made easier if
they'd made a timely record. Or made a backup, in which case they
could just grep /var/lib/dpkg/status.

If they didn't, they might have to rely on the method I outlined to
Marco (which The Wanderer corrected), using apt's history.log file.

I did try out returning a system to its initial state, admittedly
under favourable circumstances. After installing with the d-i, there
were 531 packages installed. I ran my usual script that installs
"all the rest" of my typical system, requesting 287 packages and,
with their Depends and Recommends, installing about 2050.

I then tac'd my script, edited all the installs to removes, and ran
it. As it progressed, the proffered list of suggestions for
autoremoval got longer and longer, so that by the time the script
was finished, a simple autoremove command wiped out 885 packages.

The system still had plenty of Recommends left installed, as one would
expect, so I diff'd the list of post-installer packages with the
current version to produce a 495-package purge command. (Because I
had removed rather than purged packages, there were plenty of
"rc"-status packages still installed, as well as the Recommends.
That script removed virtually all the packages I had installed myself.

I write "virtually" because, as I was doing all this casually,
I had to reinstall aptitude twice (along with its Depends and
Recommends) in order to run its "why" command, so I ended up
with those extra packages still installed.

I was impressed by apt-get's performance, probably because of dim
memories of how dpkg would react on being asked to install ~2000
packages at once. The latter doesn't have the logic for sorting
operations into a sequence that preserves an unbroken system.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#223271

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2020-06-09 08:10 +0200
Message-ID<AfFCp-6h6-1@gated-at.bofh.it>
In reply to#223252

[Multipart message — attachments visible in raw view] — view raw

On Lu, 08 iun 20, 14:32:29, David Wright wrote:
> 
> I was impressed by apt-get's performance, probably because of dim
> memories of how dpkg would react on being asked to install ~2000
> packages at once. The latter doesn't have the logic for sorting
> operations into a sequence that preserves an unbroken system.

It's unclear to me what you meant by that.

Unless you use one of the --force options (at your own risk, of course) 
dpkg will refuse actions that go against (Pre-)Depends, Conflicts and 
Breaks.

The difference between dpkg and apt in this regard is that dpkg acts 
only on the set of packages it was provided.

    User: dpkg, remove this package
    dpkg: nope, this will break these other packages
    User: apt, remove this package
    apt: sure, in addition these other packages must be removed because 
    they depend on it
    User: ok, go ahead
    apt: dpkg, remove this set of packages
    dpkg: sure, done

    User: dpkg, install this package
    dpkg: nope, it depends on these other packages that are neither 
    installed nor were provided at the same time
    User: apt, install this package
    apt: sure, in addition these other packages must be downloaded and 
    installed to fulfill dependencies (and recommendations)
    User: whatever, do it already
    apt: ok, downloading... done
    apt: dpkg, install this set of packages
    dpkg: sure, done


Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#224274

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-07-02 03:10 +0200
Message-ID<AnVTH-8cB-1@gated-at.bofh.it>
In reply to#223271

[Multipart message — attachments visible in raw view] — view raw

On Tue 09 Jun 2020 at 09:03:34 (+0300), Andrei POPESCU wrote:
> On Lu, 08 iun 20, 14:32:29, David Wright wrote:
> > 
> > I was impressed by apt-get's performance, probably because of dim
> > memories of how dpkg would react on being asked to install ~2000
> > packages at once. The latter doesn't have the logic for sorting
> > operations into a sequence that preserves an unbroken system.
> 
> It's unclear to me what you meant by that.

Perhaps I can clarify. Just as an experiment, I took a
buster system that had a minimal installation of tasks
"ssh server" and "standard utilities", plus:
etckeeper git git-man patch rsync sudo apt-show-versions aptitude.

I ran the attached file simultaneously requesting 271 packages, and
thereby installing 1558. Everything was installed and configured correctly.
I then reran the attached file but edited: install → purge,
followed by   apt-get --purge autoremove   a couple of times.
After all this, I was back at the original 350 packages that were
present before I ran the attachment. Again, no problem.

> Unless you use one of the --force options (at your own risk, of course) 
> dpkg will refuse actions that go against (Pre-)Depends, Conflicts and 
> Breaks.
> 
> The difference between dpkg and apt in this regard is that dpkg acts 
> only on the set of packages it was provided.

Having cleared the cache before I started the above, I now had the
1558 .deb files sitting in the cache, so to reinstall them I ran
# dpkg -i -R -E /var/cache/apt/archives/.
At the end of that process, the final messages from dpkg were:

  Errors were encountered while processing:
   /var/cache/apt/archives//fvwm-icons_20070101-4_all.deb
   /var/cache/apt/archives//gawk_1%3a4.2.1+dfsg-1_i386.deb
   /var/cache/apt/archives//libmotif-common_2.3.8-2_all.deb
   /var/cache/apt/archives//libxm4_2.3.8-2_i386.deb
   /var/cache/apt/archives//lilypond_2.19.81+really-2.18.2-13_i386.deb
   /var/cache/apt/archives//ntfs-3g_1%3a2017.3.23AR.3-3_i386.deb
   boot-info-script
   fig2dev
   testdisk
   xpdf

Respectively, the 10 errors were: pre-dependency (4 off),
file missing during pre-install, pre-dependency,
gawk missing (2 off), ntfs-3g missing, libxm4 missing.

In addition, this error message occurred during the run:
  systemctl preset failed on ModemManager.service: No such file or directory
There was no problem setting up modemmanager when I was using apt-get.

>     User: dpkg, remove this package
>     dpkg: nope, this will break these other packages
>     User: apt, remove this package
>     apt: sure, in addition these other packages must be removed because 
>     they depend on it
>     User: ok, go ahead
>     apt: dpkg, remove this set of packages
>     dpkg: sure, done
> 
>     User: dpkg, install this package
>     dpkg: nope, it depends on these other packages that are neither 
>     installed nor were provided at the same time
>     User: apt, install this package
>     apt: sure, in addition these other packages must be downloaded and 
>     installed to fulfill dependencies (and recommendations)
>     User: whatever, do it already
>     apt: ok, downloading... done
>     apt: dpkg, install this set of packages
>     dpkg: sure, done

So—the "dim memories": Years ago, when I had to install duplicate
systems on several machines, I would capture the cache from the first
installation on a 1GB Jaz drive, and use it to install the others.
(My systems were considerably smaller then.)

One useful command when doing this was    dpkg --configure -a
whenever dpkg got jammed up, followed by repeating the   dpkg -i
command (which explains using -E above).

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


Page 3 of 5 — ← Prev page 1 2 [3] 4 5  Next page →

Back to top | Article view | linux.debian.user


csiph-web