ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Rinat Shigapov <srk@nevod.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] Bacula и regex | wild в наборе файлов
Date: Mon, 18 Jan 2010 22:10:08 +0500
Message-ID: <4B5495F0.6020107@nevod.ru> (raw)
In-Reply-To: <4B54764F.3050601@rambler.ru>

Привожу отрывок из документации:
Now, lets assume you only want to backup .Z and .gz files and nothing 
else. This is a bit trickier because Bacula by default will select 
everything to backup, so we must exclude everything but .Z and .gz 
files. If we take the first example above and make the obvious 
modifications to it, we might come up with a FileSet that looks like this:

FileSet {
   Name = "Full Set"
   Include {                    !!!!!!!!!!!!
      Options {                    This
         wildfile = "*.Z"          example
         wildfile = "*.gz"         doesn't
                                   work
      }                          !!!!!!!!!!!!
      File = /myfile
   }
}

The *.Z and *.gz files will indeed be backed up, but all other files 
that are not matched by the Options directives will automatically be 
backed up too (i.e. that is the default rule).

To accomplish what we want, we must explicitly exclude all other files. 
We do this with the following:
FileSet {
   Name = "Full Set"
   Include {
      Options {
         wildfile = "*.Z"
         wildfile = "*.gz"
      }
      Options {
         Exclude = yes
         RegexFile = ".*"
      }
      File = /myfile
   }
}
The "trick" here was to add a RegexFile expression that matches all 
files. It does not match directory names, so all directories in /myfile 
will be backed up (the directory entry) and any *.Z and *.gz files 
contained in them. If you know that certain directories do not contain 
any *.Z or *.gz files and you do not want the directory entries backed 
up, you will need to explicitly exclude those directories. Backing up a 
directory entries is not very expensive.

-- 
С уважением,
         инженер-программист ООО "Невод"
         Ринат Шигапов
         Jabber ID: dxist эт ya.ru


  reply	other threads:[~2010-01-18 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 14:55 Денис Ягофаров
2010-01-18 17:10 ` Rinat Shigapov [this message]
2010-01-21 22:11   ` Di

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B5495F0.6020107@nevod.ru \
    --to=srk@nevod.ru \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git