Director: Catalog Resource

CommunityEnterprise

The Catalog Resource defines what catalog to use for the current job. Currently, Bacula can only handle a single database server (MySQL, PostgreSQL) that is defined when configuring Bacula. However, there may be as many Catalogs (databases) defined as you wish. For example, you may want each Client to have its own Catalog database, or you may want backup jobs to use one database and verify or restore jobs to use another database.

Since both MySQL and PostgreSQL are networked databases, they may reside either on the same machine as the Director or on a different machine on the network. See below for more details.

The following is an example of a valid Catalog resource definition:

Catalog {
    Name = BaculaCatalog
    dbname = bacula;
    user = bacula;
    password = ""
}

or for a Catalog on another machine:

Catalog {
    Name = BaculaCatalog
    dbname = bacula
    user = bacula
    password = ""
    DB Address = remote.acme.com
    DB Port = 1234
}

The explanation on how to read the directive format:

  • Name: Contains the linked name of the directive.

  • Description: Explains what the directive does.

  • Value: Indicates what type of value to provide (e.g., <type-specification>).

  • Data Type: Specifies the type of data expected.

  • Values: Lists specific acceptable values.

  • Required: If present, indicates that the directive must be set by the user, there is no default value.

  • Default: If present, indicates that the directive has a predefined value that does not need to be set by the user, cannot be removed.

  • Comment: Additional important notes.

  • Example: Shows a usage example.

Catalog Start of the Catalog resource. At least one Catalog resource must be defined.

Name

Description: The name of the Catalog. No necessary relation to the database server name.

Value(s): <name>

Data Type: string

Required: Yes

Comment: This name will be specified in the Client resource directive indicating that all catalog data for that Client is maintained in this Catalog. This directive is required.

Password

Description: Specifies the password to use when logging into the database.

Value(s): <password>

Data Type: string

Db Name

Description: Specifies the name of the database.

Value(s): <database-name>

Data Type: string

Required: Yes

Comment: If you use multiple catalogs (databases), you specify which one here. If you are using an external database server rather than the internal one, you must specify a name that is known to the server (i.e. you explicitly created the Bacula tables using this name).

User

Description: Specifies what user name to use to log into the database.

Value(s): <user-name>

Data Type: string

Db Socket

Description: This is the name of a socket to use on the local host to connect to the database.

Value(s): <socket-name>

Data Type: string

Comment: This directive is used only by MySQL. Normally, if neither DB Socket or DB Address are specified, MySQL will use the default socket. If the DB Socket is specified, the server must reside on the same machine as the Director.

Db Address

Description: This is the host address of the database server.

Value(s): <database-address>

Data Type:

Comment: Normally, you would specify this instead of DB Socket if the database server is on another machine. In that case, you will also specify DB Port. This directive is used only by MySQL and PostgreSQL.

Db Port

Description: This defines the port to be used in conjunction with DBAddress to access the database if it is on another machine.

Value(s): <port-number>

Data Type: positive integer

Comment: This directive is used only by MySQL and PostgreSQL.

Daemon Log Retention

Description: This is the retention that the Director will respect when pruning Daemon logs from the Catalog (JobId=0). The prune command can be used to delete Daemon Log records.

Value(s): <time>

Data Type: time

Go back to: Director Resource Types.