Skip Headers
Oracle® Secure Backup Reference
Release 10.1

Part Number B14236-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Backup Description File Syntax

When you use obtar -g, you specify the data you want to back up in backup description file. A backup description file (BDF) is an ASCII file that contains a list of path names to include and exclude from a backup image.

Typically, you create a BDF for each client host whose data you regularly back up, and execute a separate obtar -g command for each client host. You can specify only one client host for each backup session.

A BDF consists of a list of statements, with one statement for each line. Each statement consists of a one-character directive, which must be in column 1, and a path name or host name.

The path name can include the standard UNIX wildcard characters, which have the same meaning that they do in the UNIX shells. The wildcard characters are *, ?, [, and ]. Note that if you have path names that include any of the characters, to prevent special interpretation of these characters, you must precede each such character with a \ (backslash) character.

You can specify the following types of statements:

"BDF Example" illustrates the use of all the previous types of statements.


Host Name Statement

A host name statement specifies the name of the client host, that is, the host on which the data you want to back up is located.

The host name statement is equivalent to using the obtar -H option. You can only specify one client host for each backup session, either in a BDF or on the command line. If you do not use a host name statement or the -H option, then obtar assumes the data is located on the operator host, which is the host on which you execute the obtar command.

Note:

To back up data from a remote host, Oracle Secure Backup must be installed on the remote host, or the data must be accessible through NFS or the Domain file system.

Syntax

:hostname::=
:hostname

The hostname placeholder represents the name of a host object created with the mkhost command in obtool.

Example

Example 4-36 shows a host name statement for the host named dlsun1976.

Example 4-36 Host Name Statement

:dlsun1976

Inclusion Statement

An inclusion statement defines a scope for the backup operation, which means that obtar backs up all the files and subdirectories under the specified pathname. The scope ends with the next inclusion statement. You can limit the scope by specifying one or more exclusion statements immediately after the inclusion statement.

Because obtar uses the pathname you specify as the default location for restoring the data, it is a good idea to specify full rather than relative path names in your BDFs.

Note:

If you add a new inclusion statement to an existing BDF, obtar will perform a full backup of the specified pathname even if you are doing incremental backups on the other directories specified in the BDF.

An inclusion statement can also specify a database identifier for a Windows component database such as Active Directory.

Syntax

+pathname::=
+pathname

The pathname placeholder specified a directory or file to include in the backup image.

Example

Example 4-37 shows an inclusion statement for the absolute path /private/lashdown.

Example 4-37 Inclusion Statement

+/private/lashdown

Exclusion Statement

An exclusion statement prevents the specified files or directories from being included in the backup image. For example, you might want to exclude core dumps and application-created backup files from the backup image.

If you have recently used RMAN to back up a database, then you would probably exclude Oracle database files from non-database backup operations on the host.

A BDF can include the following types of exclusion statements:

Exclusion statements are relative to the current scope and cannot begin with a slash (/). If you specify an exclusion statement before the first inclusion statement, then obtar applies the exclusion to all trees included in the BDF.

Syntax

pathname::=
!pathname

In a global exclusion statement, the pathname placeholder specifies a path name or wildcard pattern that is to be excluded at every level in the tree.

files::=
~files

An Oracle database exclusion statement specifies that Oracle database files be excluded at every level in the tree.

pathname::=
-pathname

In a top-level exclusion statement, the pathname placeholder specifies a path name or wildcard pattern that is to be excluded if found directly under the current top-level tree.

Example

Example 4-38 shows a BDF that backs up /private/lashdown on host dlsun1976. The BDF excludes files or directories named core found anywhere in the tree, files or directories beginning with a dot (.) found in the /private/lashdown directory, or Oracle database files anywhere in the tree.

Example 4-38 Sample Exclusion Statements in a BDF

:dlsun1976
+/private/lashdown
!core
-.*
~files

Include File Statement

An include file statement enables you to include the contents of another BDF at any point in the BDF.

You might want to create an include file that lists global exclusions that are common to all backups. You would then specify this include file in each BDF.

You can nest include file statements. In other words, the include file that you specify may itself contain additional include file statements.

Syntax

.pathname:=
.pathname

The pathname placeholder specifies the full path name of the include file.

Example

Example 4-39 includes the /home/gms/bdf/common directory.

Example 4-39 Sample Exclusion Statements in a BDF

./home/gms/bdf/common

Mount Point Statement

A mount point statement determines whether obtar crosses local and remote mount points when making backups. A local mount point mounts a local file system; a remote mount point is a local mount for a file system accessed over the network. By default, file system backups do not cross mount points.

The scoping rules for mount point statements are as follows:

Example 4-41 and Example 4-42 provides an illustration of these rules.

Syntax

@crosslocalmountpoints:=
@crosslocalmountpoints

The @crosslocalmountpoints statement directs obtar to cross local, but not remote, mount points.

@crossremotemountpoints:=
@crossremotemountpoints

The @crossremotemountpoints statement directs obtar to cross remote, but not local, mount points.

@crossallmountpoints:=
@crossallmountpoints

The @crossallmountpoints statement directs obtar to cross all mount points.

Examples

Example 4-40 directs obtar to cross local (but not remote) mount points when backing up /path1 and /path2.

Example 4-40 Crossing Only Local Mount Points

@crosslocalmountpoints
+/path1
+/path2

Example 4-41 directs obtar to cross only local mount points when backing up /path1, all local and remote mount points when backing up /path2, and only local mount points when backing up /path3.

Example 4-41 Applying Mount Point Statements to Different Paths

@crosslocalmountpoints
+/path1
+/path2
@crossremotemountpoints
+/path3

Example 4-42 directs obtar to cross only local mount points when backing up /path1, only remote mount points when backing up /path2, no mount points at all (default behavior) when backing up /path3, and all local or remote mount points when backing up /path4.

Example 4-42 Applying Mount Point Statements to Different Paths

+/path1
@crosslocalmountpoints
+/path2
@crossremotemountpoints
+/path3
+/path4
@crossallmountpoints

BDF Example

Example 4-43 shows an example of a BDF. Comment lines are preceded by a pound sign (#).

Example 4-43 Sample BDF

# Use the host named chicago as the client
# host
:chicago

# cross only local mount points for the subsequent paths
@crosslocalmountpoints

# Back up all files and directories in the /home
# directory
+/home

# Do not back up any directories or files with the
# extension ".bak" that are in the /home directory
# or any of its subdirectories
!*.bak

# Do not back up any directories or files that begin
# with the letters "tmp" that are directly under
# the /home directory
-tmp*

# Do not back up any Oracle database files in the /home 
# directory or any of its subdirectories
~files

Figure 4-1 shows a file tree corresponding to the BDF example in Example 4-43. The shaded names indicate the files and directories that are backed up when you use the example BDF.