AMBSDTAR(8)

NAME
ambsdtar - Amanda Application to interface with BSD Tar

DESCRIPTION

Ambsdtar is an Amanda Application API script. It should not be run by users directly. It uses BSD Tar to backup and restore data.

The diskdevice in the disklist (DLE) must be the directory to backup.

Extracting backup never remove files. If a file where present in the level 0 backup, you removed it, made a level 1 backup, then after extracting both levels, the file will be present.

PROPERTIES

This section lists the properties that control ambsdtar's functionality. See amanda-applications(7) for information on application properties and how they are configured.

COMMAND-OPTIONS
    If set, theses options are passed asis to gtar. Each option must be a different value of the property. Some option can break how amanda do backup, use it with care. Use:
      property "COMMAND-OPTIONS" "--foo" "bar"
    Do not use:
      property "COMMAND-OPTIONS" "--foo bar"

DIRECTORY
    If set, bsdtar will backup from that directory instead of the diskdevice set by the DLE. On restore, the data is restore in that directory instead of the current working directory.

SPARSE
    If "YES", the default, it use the -S option of bsdtar when restoring to create sparse files.

STATE-DIR
    The directory where ambsdtar stores the database it uses to generate incremental dumps. The default is set when Amanda is built.

BSDTAR-PATH
    The path to the bsdtar binary. The default is set when Amanda is built.

ONE-FILE-SYSTEM
    If "YES" (the default), do not allow bsdtar to cross filesystem boundaries. If "NO", bsdtar will cross filesystem boundaries. This corresponds to the --one-filesystem option of bsdtar.

TAR-BLOCKSIZE
    Block size of Nx512 bytes (default N=20). This corresponds to the --blocking-factor option of bsdtar.

EXIT-HANDLING
    List which exit status of gtar are good or bad. eg. "1=GOOD 2=BAD", exit status of 1 will produce a good backup, exit status of 2 will give an error.

NORMAL
    List all regex (POSIX Extended Regular Expression syntax) that are normal output from gtar. These output are in the "FAILED DUMP DETAILS" section of the email report if the dump result is STRANGE or FAILED. Default values:
      "^could not open conf file"
      "^Elapsed time:"
      "^Throughput"
      ": socket ignored$"
      ": File .* shrunk by [0-9][0-9]* bytes, padding with zeros"
      ": Cannot add file .*: No such file or directory$"
      ": Error exit delayed from previous errors"
    To treat one of these default patterns differently, specify it explicitly in a different property.

IGNORE
    List all regex (POSIX Extended Regular Expression syntax) that amanda ignore. These output are never in the email report. Default values:
      ": Directory is new$"
      ": Directory has been renamed"
    To treat one of these default patterns differently, specify it explicitly in a different property.

STRANGE
    List all regex (POSIX Extended Regular Expression syntax) that are strange output from gtar. All gtar output that doesn't match a normal or ignore regex are strange by default. The result of the dump is STRANGE if gtar produce a strange output. These output are in the "FAILED DUMP DETAILS" section of the email report.

VERBOSE
    Default: "NO". If "YES", ambsdtar print more verbose debugging message and can leave temporary files in AMANDA_TMPDIR.

INCLUDE AND EXCLUDE LISTS

This application supplies exclude lists via the GNU-tar --exclude-from option. This option accepts normal shell-style wildcard expressions, using * to match any number of characters and ? to match a single character. Character classes are represented with [..], which will match any of the characters in the brackets. Expressions can be "anchored" to the base directory of the DLE by prefixing them with "./". Without this prefix, they will match at any directory level. Expressions that begin or end with a "/" will not match anything: to completely exclude a directory, do not include the trailing slash. Example expressions:

  ./temp-files           # exclude top-level directory entirely
  ./temp-files/          # BAD: does nothing
  /temp-files            # BAD: does nothing
  ./temp-files/*         # exclude directory contents; include directory
  temp-files             # exclude anything named "temp-files"
  generated-*            # exclude anything beginning with "generated-"
  *.iso                  # exclude ISO files
  proxy/local/cache      # exclude "cache" in dir "local" in "proxy"

Similarly, include expressions are supplied to GNU-tar's --files-from option. This option ordinarily does not accept any sort of wildcards, but ambsdtar "manually" applies glob pattern matching to include expressions with only one slash. The expressions must still begin with "./", so this effectively only allows expressions like "./[abc]*" or "./*.txt".

EXAMPLE

  define application-tool app_ambsdtar {
    plugin "ambsdtar"
    property "BSDTAR-PATH" "/bin/bsdtar"
    property "STATE-DIR" "/xxx/yyy"
    property "ONE-FILE-SYSTEM" "YES"
    property "TAR-BLOCKSIZE" "20"
    property "EXIT-HANDLING" "1=GOOD 2=BAD"
    # change a default NORMAL regex to a STRANGE regex.
    property "STRANGE" ": socket ignored$"
    # add three new IGNORE regex
    property "IGNORE" ": Directory is new$"
    property append "IGNORE" ": Directory has been renamed"
    property append "IGNORE" "file changed as we read it$"
  }
A dumptype using this application might look like:

  define dumptype ambsdtar_app_dtyp {
    global
    program "APPLICATION"
    application "app_ambsdtar"
  }
Note that the program parameter must be set to "APPLICATION" to use the application parameter.

SEE ALSO

amanda(8), tar(1), amanda.conf(5), amanda-applications(7)

The Amanda Wiki: : http://wiki.zmanda.com/

AUTHORS

Jean-Louis Martineau <martineau@zmanda.com>
    Zmanda, Inc. (http://www.zmanda.com)

Dustin J. Mitchell <dustin@zmanda.com>
    Zmanda, Inc. (http://www.zmanda.com)