BackupPC-users

Re: [BackupPC-users] Need help on scheduling, full backups and excluding directories

2009-10-06 19:20:57
Subject: Re: [BackupPC-users] Need help on scheduling, full backups and excluding directories
From: Holger Parplies <wbppc AT parplies DOT de>
To: anandiwp AT gmail DOT com
Date: Wed, 7 Oct 2009 01:15:49 +0200
Hi,

Anand Gupta wrote on 2009-10-07 01:49:41 +0530 [[BackupPC-users] Need help on 
scheduling, full backups and excluding directories]:
> [...]
> 2. I have excluded the following directories in backup
> 
> $Conf{BackupFilesExclude} = {
>   '*' => [
>     'WUTemp',
>     'UsrClass.dat',
>     'NTUSER.DAT',
>     'parent.lock',
>     'Thumbs.db',
>     'ntuser.dat.LOG',
>     'IconCache.db',
>     'pagefile.sys',
>     'hiberfil.sys',
>     'UsrClass.dat.LOG',
>     '/WINDOWS',
>     '/Program Files',
>     '/Progra~1',
>     '/Config.Msi',
>     '/$AVG*',
>     '/cygwin*',
>     'autoexec.ch',
>     'config.ch',
>     '/*/Cache',
>     '/RECYCLER',
>     '/RECYCLER/',
>     '/*/Temporary?Internet?Files',
>     '/System?Volume?Information',
>     '/System Volume Information/',
>     '/Documents and Settings/*/Application Data/Microsoft/Search/Data',
>     '/Documents and Settings/*/Local Settings/Application 
> Data/Google/Chrome/User Data/Default/Cache',
>     '/Documents and Settings/*/Local Settings/Application 
> Data/Mozilla/Firefox/Profiles/*.default/Cache',
>     '/Documents and Settings/*/Local Settings/Temp',
>     '/Documents and Settings/*/Local Settings/Temporary Internet Files',
>     '/System Volume Information',
>     '/Temp',
>     '/MSOCache/'
>   ]
> 
> However even though the above excludes have been put in the config file, 
> i see these directories/ files being backed up.

what XferMethod are you using? If it's smb, I believe having read that you
need '\' as path separator if you want globbing to work, eg.

        '/RECYCLER/',   # should be ok, no wildcards
        '\RECYCLER\',   # the same as above
        '/*/Cache',     # won't work, but ...
        '\*\Cache',     # should work

As I can't test that (I don't backup Windoze systems), I'd be interested in
someone confirming that (maybe you if it works ;-).

> How do i remove them from the pool ?

Since you're only keeping backups for a week, I'd suggest not worrying about
it (if space permits). Your list is quite long, so it seems quite a chore to
get rid of all those and still have backups you trust. If you really want to
do it, Jeffrey wrote a script which you can find somewhere in the archives.
If you want a *simple approximation* that is "good enough" though not 100%
correct, try something like

        find pc/ -mindepth 4 -maxdepth 4 \( -name fpagefile.sys -o -name 
fhiberfil.sys \) -exec rm {} \;

(assuming those are always in the root of a share). On the other hand, these
excludes didn't include a wildcard, so I would expect them to have been
respected (were they?).

If you're going to remove many small files that way (which I wouldn't do),
you'd want to think of either replacing the -exec with a -print0 and pipe the
output to 'xargs -0 rm' or replacing the 'find' with 'find2perl' and piping
the output into 'perl'.

Also remember that no space will be actually freed until BackupPC_nightly
runs (and don't run it by hand, use 'BackupPC_serverMesg BackupPC_nightly run'
if you really want to force an unscheduled run).

Regards,
Holger

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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/