BackupPC-users

Re: [BackupPC-users] Exclude Hidden files (Linux + SSH + tar)

2009-09-25 07:21:33
Subject: Re: [BackupPC-users] Exclude Hidden files (Linux + SSH + tar)
From: Holger Parplies <wbppc AT parplies DOT de>
To: kadamba <backuppc-forum AT backupcentral DOT com>, sandeep.sagar AT cyrusgroup DOT com
Date: Fri, 25 Sep 2009 13:17:16 +0200
Hi,

kadamba wrote on 2009-09-24 04:34:32 -0400 [[BackupPC-users]  Exclude Hidden 
files (Linux + SSH + tar)]:
> [...]
> I've installed BackupPC on Debian Lenny to backup Ubuntu Desktops (/home for
> all), I need to exclude all hidden files which is taking up lots of space.
> My focus is on user data files.
> 
> With reference to this article
> http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/backuppc-21/how-to-include-certain-files-76171/

(it's not an article, it's a mailing list post, as, I believe, someone sitting
in a glasshouse has promised should be obvious)

> I tried the following (excuse me, i am perl ignorant )
> 
> 1st. $Conf&#123;BackupFilesExclude&#125; = &#123; '*' => &#91;'.*'&#93;&#125;;
> 2nd. $Conf&#123;BackupFilesExclude&#125; = &#123; '*' => 
> &#91;'.*'&#93;,&#125;;
> 3rd. $Conf&#123;BackupFilesExclude&#125; = &#123;'*' => &#91;'.*', 
> '*/.*'&#93;,&#125;
> 4th. $Conf&#123;BackupFilesExclude&#125; = &#123;'*' => &#91;'.*', 
> '*/.*'&#93;&#125;

Well, first of all, a big *thank you* to Backup Central for mangling that -
it's pretty much useless for *painlessly* debugging. And while I'm at it,
*thank you* (to Backup Central) for not line-wrapping, too (and yes, I know
that people posting directly to the mailing list may also fail to wrap their
lines). And yes, you don't want to wrap lines from log or configuration files.
That's kind of a problem when translating from board to mailing list, isn't
it?
</sarcasm>


That said, I don't think it's an error caused by a syntactical mistake. You
seem to be excluding '.*', which includes (err, excludes :) '.' - the root of
the whole transfer. This leads to:

> 2. LOG file: Got fatal error during xfer (No files dumped for share /home)

For what you seem to want to do, you should try something like

        $Conf {BackupFilesExclude} = {
                '*' => [ '+ .', '.*' ],
        };

(which is really sort of a hack, because the "exclude" '+ .' is actually an
include by virtue of starting with '+ '; you could also use a single exclude
pattern like '.[a-zA-Z0-9]*', but you're bound to miss some characters, and
rsync doesn't seem to support things like '.[^.]*' - at least I can't find it
in the man page, feel free to try it out just the same).

You should note, though, that you are excluding any files whose names start
with '.' as well as any directories with names starting with '.' *including all
their substructure* . Traditionally, files and directories starting with '.'
are supposed to be "hidden", so you might actually want that. But you should
be aware just the same that you are also excluding files *not* starting with
'.', if any of the directories in the path start with a '.' (eg.
'/.gconf/apps/gthumb/ui/%gconf.xml').

> Other Info:
> 1. In Status page Failures that need attention has nothing
> 2. In the Host Summary web page it would say "done"

Strange. Have you got any prior successful backups for the host (without the
exclude), or was this the first attempt? Are you sure you haven't got enough
space for the '.' files? User configuration is *usually* not much data (and
static at that, and partially identical between users (-> BackupPC pooling)),
but can be quite some trouble to re-setup in case of loss. There may be notable
exceptions (like caches of web browsers, evolution, thumbnails, trash
directories, ...). Maybe you could specifically exclude those instead of *all*
configuration data? Of course, your mileage may vary.

Regards,
Holger

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
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>