hello!
I do not know if this will help.
but I use this configuration.

I use 2 different include options.
1st enables compression and exclude compressed formats.
2nd disabled compressing, backups only compressed formats.

I've spent a lot of time to figure out trick to speed up backing up files.

On 21.08.2018 10:04, Dakota Pilot wrote:
I've used wildcards and regex for years and thought I understood them until I 
encountered Bareos version of wildcards/regex!! Any help is appreciated since 
I've been banging my head on this wall for some time.

I want to match a directory named cache2 under C:/users/ for all users and 
exclude it no matter how deep in the hierarchy it is.  This is on a Windows 
system so I tried these expressions for WildDir

*/cache2
[A-Z]:/*/cache2

Both work fine in bwild if given a file like this.

c:/tmp/
c:/xyz/tmp
d:/tmp
d:/x/y/z/tmp
c:/users/brett/appdata
/home
/home/lost+found
/home/brett
C:/cache2
D:/somedir/cache2
E:/somedir/anotherdir/cache2

However, when I put this into a WildDir in a fileset and run "estimate 
job=jobname listing the directory is not excluded unless it is in the top level, 
that is c:/Users/username/cache2.

I also tried RegExDir which as I understand it is supposed to match the regex 
in a filename which may contain the full path.  If I use this regex in bregex 
it works and finds the directories with cache2 in the name.

[A-Z]:/.*/cache2

However, when added to a fileset it does not work.  I'm including the fileset 
conf file so what is wrong.  Given that bwild and bregex both say the 
expression should work it must be something in the file set.  As shown in the 
fileset I have this same thing working for other directories but I had to 
create expressions which first define the directory path and then one to not 
backup the files.  There has to be a better way to do it and hopefully with 
wildcards/regex I can simply say if this match is found exclude it.

Which is better to use - RegEx or wildcards.  I read somewhere in the docs that 
RegEx can get expensive to what are the guidelines for using it.

Here is the fileset.

BOF bareos-dir.d/fileset/WinWS.conf

FileSet {
        # File set for Windows Workstations.  Excludes all directories and
        # then backups up only the desired ones.
        
   Name = "WinWS"
Enable VSS = yes
        
        # Included options
   Include {
        # Backup all users
        File = "C:/Users"

        # Other files.
                File = "S:/Programs/Steam/userdata"
                File = "S:/bin"
                File = "S:/Games/XPlane-11"
                File = "C:/ProgramData"
                File = "S:/Projects"
        
     Options {
       Signature = MD5
       AutoExclude = yes
       Drive Type = fixed
       IgnoreCase = yes
       Compression = GZIP
# Do selected folders and files for users.
       # Documents folder.
RegExDir = "[A-Z]:/Users/"
       Wild = "[A-Z]:/Users/*"

                        # Steam files
                        RegExDir = "[A-Z]:/Programs/Steam/userdata"
                        Wild = "[A-Z]:/Programs/Steam/userdata/*"
                        
                        # Other files
                        RegExDir = "[A-Z]:/bin"
                        Wild = "[A-Z]:/bin/*"

                        # X-Plane
                        WildDir = "[A-Z]:/Games/XPlane-11/Aircraft"
                        Wild = "[A-Z]:/Games/XPlane-11/Aircraft/*"
                        WildDir = "[A-Z]:/Games/XPlane-11/Custom*"
                        Wild = "[A-Z]:/Games/XPlane-11/Custom*/*"
                        WildDir = "[A-Z]:/Games/XPlane-11/Output"
                        WildDir = "[A-Z]:/Games/XPlane-11/Output/preferences"
                        Wild = "[A-Z]:/Games/XPlane-11/Output/preferences/*"
                        WildDir = "[A-Z]:/Games/XPlane-11/Resources"
                        WildDir = "[A-Z]:/Games/XPlane-11/Resources/plugins"
                        Wild = "[A-Z]:/Games/XPlane-11/Resources/plugins/*"

                        # ProgramData Folder
                        WildDir = "[A-Z]:/ProgramData/Bareos"
                        Wild = "[A-Z]:/ProgramData/Bareos/*"
                        
                        # Projects Directory
                        WildDir = "[A-Z]:/Projects"
                        Wild = "[A-Z]:/Projects/*"
     }
                        
# Excluded
     Options {
        Exclude = yes
                        # Exclude system files.
       WildFile = "[A-Z]:/pagefile.sys"
       WildDir = "[A-Z]:/RECYCLER"
       WildDir = "[A-Z]:/$RECYCLE.BIN"
       WildDir = "[A-Z]:/System Volume Information"

                        # Exclude other items
                        RegExDir = "[A-Z]:/Games/XPlane-11"
                        Wild = "[A-Z]:/Games/XPlane-11/*"
                        RegExDir = "[A-Z]:/ProgramData"
                        Wild = "[A-Z]:/ProgramData/*"
                        RegExDir = "[A-Z]:/Projects"
                        WildDir = "[A-Z[:/*/cache2"
     }
   }
}


EOF



--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.
FileSet {
  Name = richard-srv-fd.files
  #бэкапим все, исключая определнные типы файлов
  Include {
    Options {
     compression=GZIP9
     signature= MD5
     onefs=no
 #    Plugin=test-deltaseq-fd
     #спискок типов файлов
     @/etc/bareos/included/wildfiles.conf
     exclude = yes
             }

   File = /media/raid/homes
#  File = /var/lib/transmission-daemon/info/torrents
        }

   #бэкапим, исключая все файлы, кроме типов указанных в списке
 #бэкапим, исключая все файлы, кроме типов указанных в списке
   Include {
    Options {
     signature= MD5
     onefs=no
#     Plugin=test-deltaseq-fd
     @/etc/bareos/included/wildfiles.conf
     exclude = no
             }
    Options {
     signature= MD5
     onefs=no
     #Plugin=test-deltaseq-fd
     wildfile = *
     exclude = yes
             }

    File = /media/raid/homes
#    File = /var/lib/transmission-daemon/info/torrents

        }

Exclude {
   File= /tmp
   File = /proc
   File = /lost+found
   File = /media
   File = /mnt
   File = /dev
   File = /var/tmp
   File = /run
   File = /sys
   File = /swapfile
    }
 }

#for excluding compressed files
IgnoreCase = yes
wildfile= *.mp3
wildfile= *.mp4
wildfile= *.mpg
wildfile= *.jpeg
wildfile= *.jpg
wildfile= *.tif
wildfile= *.avi
wildfile= *.vob
wildfile= *.mkv
wildfile= *.zip
wildfile= *.deb
wildfile= *.7z
wildfile= *.xz
wildfile= *.lzma
wildfile= *.rar
wildfile= *.jar
wildfile= *.MOD
wildfile= *.gz
wildfile= *.png
wildfile= *.mov
wildfile= *.djvu
wildfile= *.cbz
wildfile= *.cbr
wildfile= *.cab
wildfile= *.z0[1-9]
wildfile= *.z1[1-9]
wildfile= *.gif
wildfile= *.frdat
wildfile= *Images.aux
wildfile= *.iso
wildfile= *.tar.gz
wildfile= *.tar.bz2
wildfile= *.wmv
wildfile= *.3gp
wildfile= *.wma
wildfile= *.dt
wildfile= *.lsa
wildfile= *.dsl.dz
wildfile= *.lod
wildfile= *.lsd
wildfile= *.flv
wildfile= *.odp
wildfile= *.ppt
wildfile= *.pptx
wildfile= *imgcache.[0-9]
wildfile= *imgcacheMicro.[0-9]
wildfile= *.db.crypt7
wildfile= *.webm
wildfile= *.h264
wildfile= *.msp
wildfile= *.tib

Reply via email to