BackupPC-users

Re: [BackupPC-users] backuppc ignores value of BackupFilesOnly; archives entire /

2011-01-18 14:46:35
Subject: Re: [BackupPC-users] backuppc ignores value of BackupFilesOnly; archives entire /
From: Holger Parplies <wbppc AT parplies DOT de>
To: itismike <backuppc-forum AT backupcentral DOT com>, itismike AT gmail DOT com
Date: Tue, 18 Jan 2011 20:45:11 +0100
Hi,

itismike wrote on 2011-01-18 09:51:05 -0500 [[BackupPC-users]  backuppc ignores 
value of BackupFilesOnly; archives entire /]:
> [...]
> I don't intend to sound terse toward those reaching out to help me; only
> point out that any newcomer to this program is going to hit this same wall
> every time.

actually, that is known, because a lot of newcomers *have* hit this same wall.
If you had searched, you could have found tons of threads describing the same
mistake you have made. I am not sure whether any of those are recent, though,
because I haven't been able to follow the list closely for many months now.

As far as I remember, Craig is aware of the web interface being misleading in
this respect, and I'm sure it's somewhere on his todo-list, if not already
fixed. I'm sure any patch would be welcome anyway (though I'm not sure what
the plans are concerning new releases of BackupPC 3.* ...).

> On 1/18/2011 11:39 AM, itismike wrote:
> > [...]
> > $Conf{BackupFilesOnly} = {
> > '/home/michael/' => [
> > ''
> > ]
> > }; 
> >
> > Now if the above code can't be interpreted correctly by BackupPC, then
> > we may have stumbled upon the root cause. But I don't think this is the
> > problem or others would be finding the same issue.

It *is* interpreted *correctly*, just not how you (and others) meant it to
be ;-).

Bowie Bailey wrote on 2011-01-18 11:58:19 -0500 [Re: [BackupPC-users] backuppc 
ignores value of BackupFilesOnly; archives entire /]:
> Devs:  Would it make sense for the GUI to generate a warning message of
> some sort when the keyname does not match a share name or when there is
> a keyname with nothing specified for it?

First, I agree with Les, that the most important step would be making the
GUI more obvious on what information should be entered where.

Aside from that, it could make sense to warn about or disallow apparently
nonsensical settings in the GUI. People who actually *want* such settings for
whatever reason probably edit the config files instead of using the GUI
anyway. The question is probably, how much checking (and where) should the GUI
perform? Just prevent adding "nonsensical" settings or try to repair existing
ones (e.g. remove keys which don't match an existing ShareName; what happens
when you rename a share or temporarily remove it?)? That could easily become a
nuissance ...

itismike wrote on 2011-01-18 12:13:59 -0500 [[BackupPC-users]  backuppc ignores 
value of BackupFilesOnly; archives entire /]:
> [...]
> That being said, if entering my directory in the CGI leads to it containing
> an illegal value (sharename="/home/michael") wouldn't I expect it to throw
> an error rather than ignore the entry and backup everything?

The value is not "illegal". It is simply not used. From the top of my head, I
can think of at least three cases where this could occur:

1. You have a share "/home/michael", but you've temporarily removed it from
   your share list, because you currently don't want it to be backed up. Next
   week, you'll re-add it, and you want to keep the excludes.
   Or maybe you are planning on adding the share next week and already want
   to note the excludes in advance.
   Or maybe you want to make a note that if you should ever add the share,
   you will want to exclude something you probably won't think of when the
   time comes. Maybe this note is not to yourself but to other administrators
   of the BackupPC installation (might not apply in your case, but surely
   could in others).

2. You are renaming "/home/michael" to "/homes/michael" and want the backup
   to back up the new directory. What do you change first, the list of
   share names or the in-/excludes? What is supposed to happen in between?
   Ok, you might say, the GUI should automatically change the exclude and
   include keys, so you just need to change the share name once. In an ideal
   world, you're probably right :).

3. You have a global config ("config.pl") which specifies site defaults.
   Every machine with a share "/home/michael" should exclude the
   subdirectories ".Trash" and ".thumbnails". Machines without such a share
   should not throw errors but just silently ignore the exclude, because it
   doesn't apply.
   While this is unlikely to apply to "/home/michael", think about shares
   like "/var/spool/fax", "/srv/tftp", "/usr/local" ...

> Or does BackupPC use some type of fail-safe mode where an error in
> config.pl just defaults to: "This guy is nuts! BACK IT ALL UP!!!" :)

No, it's simply "apply includes and excludes to the shares they apply to". If
they don't apply to anything, they're not used.

Les Mikesell wrote on 2011-01-18 11:32:08 -0600 [Re: [BackupPC-users] backuppc 
ignores value of BackupFilesOnly; archives entire /]:
> On 1/18/2011 11:13 AM, itismike wrote:
> > [...]
> > I don't need to mess with RsyncShareName, right?
> > [...]
> 
> [...]
> Still, it doesn't make any sense to start at '/' and 
> make the client walk the entire directory tree looking for matches if 
> you know you don't want anything above that directory included.  The 
> right fix is to start at the point where you want a backup, then exclude 
> anything you don't want.

Err, no. There is no "right fix". There is possibly a "more efficient fix".
For rsync, I doubt it makes any difference one way or the other. If you look
at how BackupFilesOnly translates to rsync --include options, you'll see that
rsync shouldn't need to do much more additional work than read two directories
("/" and "/home").

In any case, efficiency may or may not be your primary concern. If you plan on
adding further directories later on (and don't want these to be separate
shares), you should probably leave it as it is. If you want to match mount
points (e.g. to use '-x'), you might prefer "/home" as share name.
If you originally used "/" as share name, because it best fits your personal
taste, it's fine to keep it that way for that reason alone. Use whatever you
feel most comfortable with - which may well mean following Les' suggestion,
because it seems more efficient to you. It's your decision, really.

Regards,
Holger

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
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/

<Prev in Thread] Current Thread [Next in Thread>