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

Re: Removal of data on purge (Was: OpenMRS package is ready, I believe)



On Wed, Oct 06, 2010 at 12:00:49AM +0200, Karsten Hilbert wrote:
> So they are user content. Absolutely. Don't delete them.

As Misha said - they are not deleted (and I hope my mails did not
implied that I suggested to do so).
 
> This is very much like deleting user home pages when
> deinstalling Apache.

Wrong comparison in two aspects:

  1. Apache has nothing to do with user home pages.
  2. If you say "deinstalling" you probably mean *remove*
     and not *purge*, which even leaves Apache configuration.

The comparison with user content can be made the following way:

  remove works like deluser (and leaves home directories untouched)
  purge works like deluser --remove-home --remove-all-files

and you should not be astonished if after the latter command
user content is gone.
 
> Absolutely !  Don't. Or if at all - offer an option to do
> so, have the user confirm at least twice with BIG FAT
> warnings and still stow away a secret backup somewhere.

The option is there and its name is "apt-get remove openmrs".
 
> > p.p.s. I just checked and even purging mysql does not actually remove
> > database data:
> 
> Same with PostgreSQL.

Well, a database server is somehow considered like a file system.  It
provides means to store data.  There are programs which are using this
server to store dedicated data in this storage area and it is the
obligation of the install / deinstall routines to handle these data.
It is perfectly OK if this kind of application is purging the content
which was created using it from the data store.  It is not OK if the
datastore itself touches information created by other programs.  For
the maintainer of {My,Postgre}SQL it is not detectable at the time of
a purge, what application has touched what database and so purging
these would mean touching data of other packages.  This point supports
the do not delete the databases view (and I share this idea).

However from a packaging centric point of view it is a valid point of
view to say:  If {My,Postgre}SQL is *purged* all applications that
depend on {My,Postgre}SQL are purged as well, so once this step is
finished no application can use the data any more and the user has asked
for a purge.  So it makes perfectly sense to also purge the databases.
(Note: I personally do not support this point of view but it has some
logic and if the maintainers of the database packages would decide this
way it could become hard to argue against this.)

Just remind: Purge means purge; mke2fs means create new file system and
  dd if=/dev/null of=/dev/sda
means override your hardisk with NULL values.  You should not be
astonished if your data are gone.  Don't use purge if you mean remove.

Kind regards

      Andreas.

-- 
http://fam-tille.de


Reply to: