BackupPC-users

Re: [BackupPC-users] [BackupPC-devel] Ubuntu Upgrade from 3.0.0 to 3.1.0 problem

2008-07-24 11:32:05
Subject: Re: [BackupPC-users] [BackupPC-devel] Ubuntu Upgrade from 3.0.0 to 3.1.0 problem
From: "Jon Craig" <cannedspam.cant AT gmail DOT com>
To: "Holger Parplies" <wbppc AT parplies DOT de>
Date: Thu, 24 Jul 2008 11:31:58 -0400
On 7/22/08, Holger Parplies <wbppc AT parplies DOT de> wrote:
> Hi,
>
>  I'm redirecting this to <backuppc-users> as it's a usage issue.
>
>  Jon Craig wrote on 2008-07-22 13:42:33 -0400 [[BackupPC-devel] Ubuntu 
> Upgrade from 3.0.0 to 3.1.0 problem]:
>
> > I started with the Ubuntu backuppc package that is based on "3.0.0".
>  > Once I was convinced that BackupPC was the way to go I downloaded and
>  > installed the "3.1.0" and ran the configure.
>
>
> Bad idea. You shouldn't mix packaged and tarball installs. Your dpkg status
>  database now contains references to files belonging to a deb-package named
>  "backuppc" which possibly don't exist any longer or at the very least have

Agreed, as this was a personal install at home I took liberties that I
wouldn't take at a paying gig.

>  different contents. To make things worse, dpkg "knows" that the installed
>  version is 3.0.0 (possibly with a Ubuntu package revision number appended).
>  'apt-get install --reinstall backuppc' is guaranteed to get things horribly
>  wrong, as are 'apt-get install backuppc'/'apt-get [dist-]upgrade' when 
> there's
>  a new BackupPC package in Ubuntu - including possibly a security update of
>  3.0.0, and 'apt-get remove backuppc' as there are probably new files unknown
>  to dpkg - possibly duplicates in non-Ubuntu locations. dpkg thinks it knows
>  about the package and its files, but this knowledge is now outdated. There is
>  no simple way to recover from this.
>

Here's what I was gonna do:
Shutdown BackupPC
Save the /etc/backuppc directory and move the /var/lib/backuppc
directory to a safe place.
Force remove the Ubunto package
run the install for the tarball to get a plain jane version
Put /etc/backuppc to /etc/BackupPC and /var/lib/backuppc back to its place
Fixup any path issues with file location in config.pl
Start BackupPC

>
>  > I then looked at the configure.pl from the install package and found
>  > that it set $useFHS to 1 when it detected a "/etc/BackupPC" directory.
>  >  It's my guess that at one point this was the naming for the directory
>  > and it underwent a rename.
>
>
> Wrong. It still is /etc/BackupPC for the tarball version. The Debian and
>  Ubuntu packages use /etc/backuppc. I think this is a good idea, because it
>  discourages mixing up package and tarball :-).

Not sure I agree with this or at least with the manner of implementation.

1st, Ubuntu maintainers must have hand modified the code to get it to
recognize /etc/backuppc as a place to check for configs.  This is a
very bad thing to have happening as you have unversioned code variants
in the wild and users who don't even know it.

2nd, configure.pl didn't detect the fact that backuppc wasn't BackupPC
and installed.  It also didn't create a BackupPC directory.  If your
gonna rely on an alternate name to indicate a package install then
configure.pl should have recognized this and bombed out with an
appropriate message: "tsk, tsk, tsk, don't mix packages with
tarballs".

3rd, the way in which BackupPC is trying to determine its ConfDir
needs to be addressed.  The magic $useFHS variable (coupled with
packagers editing the code to make the match work) is bound to cause
problems.  BackupPC should set a location for a config file that
points to the configuration directory /etc/BackupPC.conf or
/etc/default/BackupPC.conf that holds possibly one thing ConfDir =
/etc/BackupPC or whatever.  You should also be able to specify the
configuration directory on the command line BackupPC --confdir=XXX for
those poor souls who feel strongly that the location you chose for the
immovable conf file was inappropriate.

>
>  Regards,
>
> Holger
>


-- 
Jonathan Craig

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/