Bacula-users

Re: [Bacula-users] regex strangeness with Windows filesets

2008-05-13 10:35:24
Subject: Re: [Bacula-users] regex strangeness with Windows filesets
From: "Israel Miranda" <programadorlinux AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 13 May 2008 11:34:37 -0300
I use bacula-fd 2.2.8 in a windows xp machine without problem
that's my fileset:

FileSet
{
  Name = "thunderbird-file-set"
  Enable VSS = yes
  Exclude
  {

     Options
     {
       #the line belo doesn't work
       #RegexDir = "c:/Documents and Settings/*/Dados de aplicativos/([^t]|t[^h]|th[^u]|thu[^n]|thun[^d]|thund[^e]|thunde[^r]|thunder[^b]|thunderb[^i]|thunderbi[^r]|thunderbir[^d])/"
       WildFile = "c:/Documents and Settings/*"
       Wild = "c:/Documents and Settings/All Users"
       Wild = "c:/Documents and Settings/Default User"
       Wild = "c:/Documents and Settings/LocalService"
       Wild = "c:/Documents and Settings/NetworkService"
       WildFile = "c:/Documents and Settings/*/*"
       WildFile = "c:/Documents and Settings/*/*.*"
       Wild = "c:/Documents and Settings/*/Ambiente de impressão"
       Wild = "c:/Documents and Settings/*/.*"
       Wild = "c:/Documents and Settings/*/Ambiente de rede"
       Wild = "c:/Documents and Settings/*/Cookies"
       Wild = "c:/Documents and Settings/*/Configurações locais"
       Wild = "c:/Documents and Settings/*/Contacts"
       Wild = "c:/Documents and Settings/*/Desktop"
       Wild = "c:/Documents and Settings/*/Favoritos"
       Wild = "c:/Documents and Settings/*/Macromedia"
       Wild = "c:/Documents and Settings/*/Menu Iniciar"
       Wild = "c:/Documents and Settings/*/Meus documentos"
       Wild = "c:/Documents and Settings/*/Modelos"
       Wild = "c:/Documents and Settings/*/UserData"
       Wild = "c:/Documents and Settings/*/Recent"
       Wild = "c:/Documents and Settings/*/SendTo"
       Wild = "c:/Documents and Settings/*/workspace"
       WildFile = "c:/Documents and Settings/*/Dados de aplicativos/*"
       WildFile = "c:/Documents and Settings/*/Dados de aplicativos/*.*"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Adobe"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/AVG7"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/BrOffice.org2"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Help"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Identities"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Microsoft"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Mozilla"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/NCH Swift Sound"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Notepad++"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/PLSQL Developer"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Sun"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/Skype"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/skypePM"
       Wild = "c:/Documents and Settings/*/Dados de aplicativos/WinRAR"

     }
  }

  Include
  {
     Options
     {
       signature = MD5         #Create MD5 Signature
       compression=GZIP       #Compress Incoming Data on the client
       #the line below doesn't work
       #Wilddir = "c:/Documents and Settings/*/Dados de aplicativos/Thunderbird/Profiles/"
     }
     File = "c:/Documents and Settings/"
  }
}
 This backs up thunderbird files only.
and your
regexfile = ".*doc"
line, wouldn't it be
regexfile = "*.doc"  instead?

and if you exclude a dir with any directive, you won't be able to copy anything from that. Maybe that's the reason why it's not working.
this is a feature bacula must have, but doesn't have right now, so the solution is to specify every other directory in the tree you want to exclude, besides what you want to back up.

Study my example above.

2008/5/13 Frans Lawaetz <frans AT tributes DOT com>:
It is quite possible my regex needs some fixing but it seems to me like
there are inconsistencies in Bacula pattern matching between *nix and
Windows beyond what is noted in the docs.

The following example comes from the documentation:

FileSet {
 Name = "Full Set"
 Include {
    Options {
       wildfile = "*.Z"
       wildfile = "*.gz"
    }
    Options {
       Exclude = yes
       RegexFile = ".*"
    }
    File = /myfile
 }
}

The effect above is to backup only .Z and .gz files.

Below is my Windows Fileset:

FileSet {
Name = "WinClient"
Include {
 Options {
  signature = MD5
  compression = GZIP3
  IgnoreCase = yes
  regexfile = ".*doc"
 }

 Options {
  Exclude = yes
  IgnoreCase = yes
  regexfile = ".*"
  WildDir = "c:/Documents and Settings/Administrator"alost
  WildDir = "c:/Documents and Settings/NetworkService"
  WildDir = "c:/Documents and Settings/All Users"
  WildDir = "c:/Documents and Settings/Default User"
  WildDir = "c:/Documents and Settings/LocalService"
  WildDir = "c:/Documents and Settings/*/Application Data"
  WildDir = "c:/Documents and Settings/*/LocalService"
  WildDir = "c:/Documents and Settings/*/nethood"
  WildDir = "c:/Documents and Settings/*/printhood"
  WildDir = "c:/Documents and Settings/*/LocalService"

 }
 File = "c:/Documents and Settings"
}
}

The intent above is to only capture *.doc files from within the
user's directory.  The output of an estimate run, however, is to capture
all files.  Interestingly the WildDir directives are obeyed and all
directories listed are skipped (including those with wildcards).  But
the "regexfile" directive seems to have no effect.  Per output below,
file test.mp3 is immediately picked up.

Using Catalog "MyCatalog"
Connecting to Client 192.168.32.240 at 192.168.32.240:9102
-rwxrwxrwx   1 0        0          7278452 2008-05-08 14:51:07
c:/Documents and Settings/test/asfd/test.mp3
drwxrwxrwx   1 0        0                0 2008-05-08 11:12:27
c:/Documents and Settings/test/asfd


I have tried a number of permutations of "regexfile" and "wildfile" with a
variety of regex code (*, .*, *.mp3, .*\.mp3$, etc).

I am running bacula-2.2.8 SD, DIR, on CentOS 5.1.  The FD is a Windows
XP SP2 system running Bacula 2.2.10-b2

Thanks in advance for your assistance.










-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users



--
Meus cumprimentos,

Israel Vinícius Nogueira Miranda
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users