Advanced Configuration - PostgreSQL iDataAgent

Table of Contents

Understanding the CommCell Console

The PostgreSQL iDataAgent uses the following logical entities to manage backup and restore operations from the CommCell Console.

Client

The computer in which the iDataAgent is installed and contains the data to be secured.

Instance

The PostgreSQL database to be used for the backup and restore operations.

BackupSet

By default, the iDataAgent creates backup sets while creating an instance.

Dump Based BackupSet

A dump based backupset contains selected individual or a group of databases herein referred as dumps.

File System Based BackupSet

A file system based backupset contains an entire PostgreSQL server which includes all the databases and logs.

Subclient

The PostgreSQL data to be backed up.

5

Managing Instances

The PostgreSQL iDataAgent is designed to back up and restore PostgreSQL server databases and transaction logs. It is necessary to create an instance which can be used to backup data. Once you configure the PostgreSQL instance, the system automatically generates the default backup sets and default subclients. You can manage your instance as described in the following sections:

Adding a New PostgreSQL Instance

Use the following steps to create a new PostgreSQL instance.

  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click PostgreSQL, point to All Tasks, and then click New PostgreSQL Instance.
  1. In the Instance Name box type the PostgreSQL instance name.
  2. In the PostgreSQL User Name box, type the database Administrator user name with the permissions to perform jobs.
  3. In the PostgreSQL User Password box, type the account password for the PostgreSQL user.
  4. In the PostgreSQL Confirm Password box, re-type the password.
  5. In the Maintenance box, type the name of the Maintenance Database.
  6. In the Binary Directory box, type the path to the Binary directory. Alternatively, click Browse to select the path.
  7. In the Lib Directory box, type the path to the Library directory. Alternatively, click Browse to select the path.
  8. In the Archive Log Directory box, type the path to the directory where you wish to store the archive log files.. Alternatively, click Browse to select the path.
  9. In the Port box, type or select the Port number.

    Optional: If you are using the same port number for two or more instances, you can type the port number in the IP:PORT format.

    For example: You can type the port number as 10.57.198.4:5432, if the IP for your Network Interface Card (NIC) is 10.57.198.4 and you are using port 5432. To use the same port number on a different NIC, you can type 10.57.198.5:5432.

  10. In the Log Backup Storage Policy box, type or select the storage policy.
  11. Click OK.

Changing the Maintenance Database

Any database that exists on PostgreSQL server except template1 can be selected as a Maintenance database. Use the following steps to change the Maintenance database.

  1. From the CommCell Browser, navigate to <Client> | PostgreSQL.
  2. Right-click <Instance>, and then click Properties.
  3. In the Maintenance DB box, type the name of the Maintenance Database.
  4. Click OK.

Changing the PostgreSQL Binary Directory

The PostgreSQL Binary Directory path may change when you upgrade the PostgreSQL Server version and retain the existing instance on which you are performing backup and recovery operations. In such cases, you can use the following steps to update or change the PostgreSQL Binary Directory path. Make sure to avoid using special characters such as slash(/), underscore(_), and spaces in the binary directory path.

Use the following steps to change the path to the binary directory:

  1. From the CommCell Browser, navigate to <Client> | PostgreSQL.
  2. Right-click the <Instance>, and then click Properties.
  3. In the Binary Directory box, type the path to the Binary directory. Alternatively, click Browse to select the path. The PostgreSQL Binary Directory is generally located under the PostgreSQL install directory.

    Example:

    For Windows, the path would be similar to  C:\Program Files\PostgreSQL\9.0\bin

    For Unix, the path would be similar to /opt/PostgreSQL/9.0/bin

  4. Click OK.

Configuring the Library Directory

PostgreSQL Library directory refers to the location where the PostgreSQL library files reside. You can modify the home path location for an instance at any point of time. Postgres Lib directory path must contain libpq.so file and other related files. This library is used to connect to the database and execute queries. Execute the following command from the bin directory to locate required library path:

pg_config --libdir

For example:

bash-3.2$ cd /opt/PostgreSQL/8.4/bin

bash-3.2$./pg_config --libdir

bash-3.2$ /opt/PostgreSQL/8.4/lib

Use the following steps to change the path to the Library directory:

  1. From the CommCell Browser, navigate to <Client> | PostgreSQL.
  2. Right-click the <Instance>, and then click Properties.
  3. In the Lib Directory box, type the path to the Library directory. Alternatively, click Browse to select the path. The PostgreSQL Library Directory is generally located under the PostgreSQL install directory.

    Example:

    For Windows, the path would be similar to  C:\Program Files\PostgreSQL\9.1\lib

    For Unix, the path would be similar to /opt/PostgreSQL/9.1/lib

  4. Click OK.

Configuring the Archive Log Directory

Archive log files are stored in the Archive Log directory. Ensure to follow the below checkpoints before running the PostgreSQL FS backup.

  • Specify the Archive log directory path in the postgresql.conf file prior to performing the PostgreSQL FS backup. Make sure that this path does not point to pg_log and pg_xlog directories.

    archive_command = 'cp %p /opt/wal/%f' #UNIX
    archive_command = 'copy "%p" "D:\\PostgreSQL\\wal\\%f"' #Windows

  • From PostgreSQL 8.3 version onwards, use the following command to turn on the archive_mode. This feature is not supported for PostgreSQL 8.2 and earlier versions.

    archive_mode = on

  • From PostgreSQL 9.x.x version onwards, use the following configuration.

    Set wal_level = archive instead of default wal_level = minimal

Changing the Archive Log Directory

If the drive is full, you can change the Archive log directory to a different path. In Linux, you must have read, write and execute (r-w-x) permissions for this directory.

Make sure that this path does not point to pg_log and pg_xlog directories.

Use the following steps to change the Archive Log Directory path.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | PostgreSQL.
  2. Right-click the <Instance>, and then click Properties.
  3. In the Archive Log Directory box, type the name of the Archive Log Directory. Alternatively, click Browse to select the path. Generally, the Archive Log Directory is created in the drive/partition that has more free space.
  4. Click OK.

Enabling Archive Log Deletion after Backup

By default, the log files in the wal directory that are backed up during a backup operation are not deleted after the backup job. If you want, you can delete these backed up log files after a backup by enabling the Archive Delete option at the instance level. The log files that are archived, but not backed up will remain in the wal directory.

Note: In case of a replication setup, disable the Archive Delete option at the instance level to prevent the deletion of transaction logs.

Use the following steps to enable deletion of logs soon after a backup:

  1. From the CommCell Browser, navigate to <Client> | PostgreSQL.
  2. Right-click the <Instance>, and then click Properties.
  3. Click the Log Backup tab.
  4. Select the Archive Delete check box.
  5. Click OK.

Changing the Port Details

If the PostgreSQL server has more than once instance, each instance must use a separate port number. By default, the port number will be 5432. Use the following steps to change the port number for any instance.

  1. From the CommCell Browser, navigate to <Client> | PostgreSQL.
  2. Right-click <Instance>, and then click Properties.
  1. In the Port box, type or select the Port number.
  2. Click OK.

Configuring User Accounts for Backups

The PostgreSQL iDataAgent requires a user account that has sufficient privileges to perform the following:

• Perform backup and restore operations

• Access the PostgreSQL Server application

• Stop or Start PostgreSQL services

The following table illustrates the necessary privileges the user account should have to perform backup and restore operations:

Operations Privileges PostgreSQL User Should Have:
Backup Full Database Administrator privileges.
Restore Full Database Administrator privileges.

Initially, the user account credentials is provided during the instance configuration after the installation of the Agent. You can change the user account at the Instance level.

At the Instance Level

This user account will be used for all instances and associated subclients. Use the following steps to change the user account for an Instance:

  1. From the CommCell Browser, navigate to Client Computers | <Client> | PostGreSQL.
  2. Right-click the <Instance> and click Properties.
  3. Click the Accounts tab.
  4. Type the user name in the PostGres User Name box.
  5. Type the password in the PostGres Account Password box.
  6. Retype the password in the PostGres Confirm Password box.
  7. Click OK.

Managing Subclients

This iDataAgent is designed to back up and restore PostgreSQL Server databases and transaction logs. Once you configure the PostgreSQL instance, the system automatically generates the default backup sets and default subclients. However, you can use the CommCell Console to create user-defined subclients for DumpBasedBackupSet and distribute some of the database content for frequently used databases. You can create subclients to backup specific databases for dump based backups. Distributing the client data using subclients in this way can help improve backup performance by organizing the workload on the client into logical grouping. For a default subclient, the newly created databases in the PostgreSQL Server will be automatically discovered at the time of backup operation and backed up as part of default subclient content.

You cannot create a subclient for FSBasedBackupSet. It has only default subclients.

Creating a Subclient to Back Up Specific Databases

  1. From the CommCell Browser, right-click the DumpBasedBackupSet and then click All Tasks | New Subclient.
  2. Type the name (up to 32 characters) of the subclient in the Subclient box.
  3. Click the Content tab and then select the database (s) that you want to associate with this subclient.
  4. Click Configure to view, add, or modify the eligible databases for inclusion into the subclient content. Any content that you do not distribute to the user-defined subclients will remain in the default subclient.
  5. Click the Storage Device tab and select a storage policy to associate with this subclient from the storage policy list.
  6. Click OK.

Enabling Object List Collection during Backup

For Dump Based backups, you can include the Object List in the backup content by enabling the Collect Object List During Backup option. When this option is enabled, the restore operations will run faster, however, the backup operation may consume additional time to backup the Object List which contains the metadata information. Use the following steps for enabling the Object list collection during a backup:

  1. From the CommCell Browser, navigate to <Client> | PostgreSQL | DumpBasedBackupSet.
  2. Right-click the <Subclient>, and then click Properties.
  1. Select the Collect Object List During Backup check box.
  2. Click OK.

Configuring Streams for Backups

By default, the data and log backup is sent to media in a single stream for FSBasedBackupSet. You cannot change the number of streams which is set to one for data and log backup for file system based backupset.

The number of streams for data backup is set to one by default for DumpBasedBackupSet too. However, you can change the number of streams based on the streams configured in the subclient's storage policy.

In case of dump based backup running with multiple streams, number of streams should at least be equal to the number of databases being backed up because each database dump uses only one stream to back up.

Data Backups

  1. From the CommCell Browser, navigate to <Client> | PostgreSQL | <Instance> | <BackupSet>.
  2. Right-click the <Subclient>, and then click Properties.
  3. Click the Storage Device tab.
  4. In the Number of Data Backup Streams box for Dump based backups set, type or select the number of data backup streams.

    For FS based  backupset,  you cannot change the number of streams which is set to one for data backups.

  5. Click OK.

    Dump based backupset:

    File System based backupset:

Log Backups

  1. From the CommCell Browser, navigate to <Client>| PostgreSQL.
  2. Right-click the <Instance>, and then click Properties.
  3. Click the Storage Device tab, and then click the Log Backup tab.
  4. Click OK.

    File System based backupset:

Modifying an Instance or Subclient

There are several configurable properties available for this agent that can be modified from the agent, instance or subclient level as per your requirement.

It is recommended that that you do not modify the properties of an instance or subclient when a job is in progress for that specific instance or subclient. If a job is in progress, either wait for the job to complete or kill the job from the Job Controller.

In certain cases, the instance status will be marked as unknown, either due to connectivity issues between the client and CommServe or if the database listener service is down. However, you can still modify the properties of the instance from the CommCell Console.

  1. From the CommCell Browser, double-click the agent, instance, or subclient you wish to modify.

    Alternatively, you can also right-click the agent, instance, or subclient and then click Properties.

  2. Navigate to the tab containing the property you wish to modify.
  3. Modify the desired property and click OK.

The newly created databases will be automatically added to the default subclient.

The following table describes the properties that can configured from the agent, instance, and subclient levels.

Option Description Related Topics
Change the User Account Details

To perform backup and restore operations, the user must have administrator privileges to access the application.

In the case of  backup and restore operations from the CommCell Console, the user credentials to access the application are provided initially when you create the instance. If necessary, the credentials can be modified from the Accounts tab of the Instance Properties dialog box.

You can modify the user credentials on clients.

  1. From the CommCell Browser, navigate to Client Computers | <Client> | PostgreSQL.
  2. Right-click the <instance>, and then click Properties.
  3. Click the Accounts tab.
  4. In the PostGres User Name box, type the user name.
  5. In the PostGres User Password box, type the Password.
  6. In the PostGres Confirm Password box, retype the Password.
  7. In the PostGres User Name box, type the user name.
  8. Click OK.
Refer to User Account and Password Management.
Change Storage Policies You can modify the storage policies in any of the following situations:
  • To include a different media for the backup operation.
  • To use a storage policy with a different retention criteria.

You can change the storage policies from the subclient level.

  1. From the CommCell Browser, right-click the subclient.
  2. Click Properties.
  3. Click Storage Device.
  4. Select the Storage policy from the drop-down menu.
  5. Click OK.
Refer to Storage Policies.
Rename a Subclient

You can rename a subclient:

  1. From the CommCell Browser, right-click the subclient.
  2. Click Properties.
  3. Type the new name in the  Subclient name field.
  4. Click OK.
 
Configure Data Transfer Options You can configure the available resources for transferring data secured by data protection operations from the subclient level. This includes the following:
  • Enable or disable Data Compression either on the client or on the MediaAgent.
  • Configure the transfer of data in the network using the options for Network Bandwidth Throttling and Network Agents.

You can configure the data transfer options.

  1. From the CommCell Browser, right-click the subclient.
  2. Click Properties.
  3. Click Storage Device.
  4. Click Data Transfer Option tab.
  5. Choose the appropriate software compression option for this subclient.
  6. Select Throttle Network Bandwidth and set the required bandwidth.
  7. Click OK.
Refer to Data Compression and Network Bandwidth Throttling.
View Data Paths You can view the data paths associated with the primary storage policy copy of the selected storage policy or incremental storage policy. You can also modify the data paths including their priority from the subclient level.
  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Storage Device.
  4. Select Storage Policy from the drop-down menu.
  5. Click Data Paths.
 
Set the Number of Streams You can set the number of streams for log backup from the instance level.
  1. From the Instance Properties (Log Backup) tab, select the number of data streams from the Number of Data Backup Streams field.
  2. Click OK to save your settings.
Similarly, you can set the number of streams for data backup from the subclient level.
  1. From the Subclient Properties (Storage Device) tab, select the number of data streams from the Number of Data Backup Streams field.
  2. Click OK to save your settings.
Refer to Streams.
Configure a Subclient for Pre and Post Processing of Data Protection Pre/Post Scripts are batch files or shell scripts that you can run before or after certain job phases.

You can add, modify or view Pre/Post processes for the subclient. These are batch files or shell scripts that you can run before or after certain job phases.

  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Pre/Post Process.
  4. Click one of the following phases and type the full path of the process that you want to execute during that phase. Alternatively, click Browse to locate the process (applicable only for paths that do not contain any spaces).
    • PreBackup Process
    • PostBackup Process
  5. Click OK.
  6. Select Run Post Backup Process for all attempts to run a post backup process for all attempts.
  7. For subclients on Windows platforms, Run As displays Not Selected.

    If you want to change the account that has permission to run these commands, click Change.

    1. In the User Account dialog box, select Use Local System Account, or select Impersonate User and enter the user name and password. click OK.
    2. If you selected Local System Account, click OK to the message advising you that commands using this account have rights to access all data on the client computer.
Refer to Pre/Post Processes.
Configure Activity Control You can enable backup and restore operations from the agent and subclient level. However, you can enable restore operations only from the agent level.
  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Activity Control, select or clear option(s) as desired.
  4. Click OK.
Refer to Activity Control.
Configure User Security You can configure user security from the agent or subclient level.

You can perform the following functions:

  • Identify the user groups to which this CommCell object is associated.
  • Associate this object with a user group.
  • Disassociate this object from a user group.
  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Security.
  4. Select the appropriate user groups to which you want to associate to the CommCell object from the Available Groups pane, and then move the user group to the Associated Groups pane.
  5. Click OK.
Refer to User Administration and Security.
Enable and Disable Data Encryption When you configure encryption at the client level, it is configured automatically for all the subclients associated with all the agents installed on that client. If you want to disable or change the encryption at the subclient level, follow the steps given below:
  1. From the CommCell browser, right-click the subclient.
  2. Click Properties.
  3. Click Encryption.
  4. Select the desired encryption.
  5. Click OK.
Refer to Data Encryption.
View Software Version and Installed Updates At the client level, the Version tab of the Properties dialog box displays the software version of the component.
  1. From the CommCell Browser, expand Client Computers.
  2. Right-click the appropriate client, and then click Properties.
  3. Select the Version tab.
  4. Click OK.
 

Deleting an Agent, Instance, or Subclient

The following sections describe the steps involved in deleting an agent, instance, or subclient.

When you delete a subclient, the associated data is logically deleted and you can no longer access the corresponding data from CommCell Console for recovery purposes.

Refer to the troubleshooting article on Recovering Data Associated with Deleted Clients and Storage Policies for information on how to recover data if you accidentally delete an entity.

Deleting an Agent

You need to uninstall or DeConfigure the agent software from the client computer before deleting from CommCell Browser. After you delete the client software, you can either leave the corresponding data intact for appropriate action or you can remove the data immediately. If you choose to remove the data immediately, you must delete the agent from the CommCell Browser. If you delete the agent, all of the agent's data is irretrievably lost.

  • You cannot delete an agent while operations for that agent are running.
  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click the <Agent>, and then click Delete.
  3. A confirmation message is displayed with the following message:

    This operation will permanently delete the data backed up from this level and it cannot be restored.

  4. Click OK to continue with the deletion operation or click No to abort the deletion.

Deleting an Instance

Consider the following before deleting an instance:

  • When you delete a specific instance all job schedules and job histories that pertain to any of the levels within the deleted instance are deleted.
  • You cannot delete an instance if it is being backed up. Attempts to delete an instance under such conditions cause the deletion to fail. If a backup is in progress, either wait for the backup to complete or kill the backup job using the Job Manager. Once the backup is no longer in progress, you can delete the instance level.
  • You cannot delete an instance if there is only one instance present for an agent. To delete the final instance, you must remove the agent software from the client computer.
  1. From the CommCell Browser, right-click the instance that you want to delete, click All Tasks and then click Delete.
  2. Click Yes to confirm the deletion. (Clicking No cancels the deletion and retains the node.)
  3. Type the requested phrase in the Enter Confirmation Text dialog box and click OK. This should delete the instance.

Deleting a Subclient

Consider the following before deleting a subclient:

  • You cannot delete a default subclient.
  • Schedules associated with the subclient are also automatically deleted.
  1. From the CommCell Browser, navigate to Client Computers | <Client> | <Agent> | <Instance>
  2. Right-click the <subclient> that you want to delete, and then click Delete.
  3. A confirmation message is displayed, asking if you want to delete the subclient.

    Click No to cancel the deletion and retain the subclient, or click Yes to continue the deletion.