3 Installing and Configuring the DIVArchive Backup Service

This chapter describes installing and configuring the DIVArchive Backup Service and includes the following information:

DIVArchive Backup Service Overview

The DIVArchive Backup Service enables configuration of scheduled backups through its configuration file, and manages and monitors the entire backup process. It is strictly required to use the DIVArchive backup service when using complex objects.

The service uses existing DIVArchive Backup scripts (these scripts use the Oracle RMAN tool) to generate full database backups, and incremental database backups of the Oracle Database. Generated Oracle Database backup files and Metadata Database files created by the Manager (when complex objects are created) are incrementally replicated by the Backup Service to remote backup servers using the RSYNC tool.

DIVArchive Backup Service Prerequisites

The following components and services are prerequisites for using the DIVArchive Backup Service component. CYGWIN with the RSYNC service is required for the Backup Service to function. The DIVArchive Manager server, DIVArchive Backup Manager server, DIVArchive Database server, and all remote backup systems must have the following installed:

Caution:

The first two modules must be installed in the specific sequence shown before proceeding.
  • CYGWIN must be installed using the DIVArchive Prerequisites package.

  • RSYNC

    • CYGWIN must be installed before running the RSYNC installation.

    • http://rsync.samba.org

    • You must configure the RSYNC modules.

    • You must have the RSYNC service running.

  • You must install the DIVArchive Backup Service on the server where the DIVArchive Manager and Oracle Database are installed.

  • You must download and install 7zip for 32-bit Windows (http://www.7-zip.org/).

  • You must download and install Oracle Java JDK/JRE build 1.8.0_45-b02.

Installing the DIVArchive Backup Service Software

The DIVArchive Backup Service component is installed as an integral part of the standard DIVArchive system installation. You must install the component on the same server as the DIVArchive Manager and Oracle Database. Also, the Backup Service does not support installation with the Manager and Oracle Database installed on separate computers.

You must configure the DIVArchive Backup Service to replicate files across multiple backup servers for redundancy. Therefore, you must identify the following systems before installation for successful use of the DIVArchive Backup Service:

  • Which computer is called Backup System 1 (required)

  • Which computer is called Backup System 2 (required)

  • Which additional computers are called Backup System additional_number. The additional_number identifies additional backup server numbering, for example Backup System 3, or Backup System 4. This is optional and only required to have more than two backup systems.

You must ensure the Database check box is selected on the Choose Components screen during DIVArchive installation to install the DIVArchive Backup Service.

Configuring the DIVArchive Backup Service

By default, the Backup Service is installed in the %DIVA_HOME%\Program\DBBackup folder. The default Backup Service configuration file is named backup.conf.ini and is located in the %DIVA_HOME%\Program\conf\db_backup folder.

You must configure the settings in both the DIVArchive Configuration Utility and the Backup Service configuration file. You must rename the configuration file from backup.conf.ini to backup.conf.

You must edit the configuration file, set the application parameters, and verify the default values.

Note:

You must use a slash instead of the normal backslash for the folder separator in the configuration file.

The following two parameters define the scope of operations in the DIVArchive Backup Service's backup.conf configuration file. If you set both of these parameters to N (indicating no, or disabled), the DIVArchive Backup Service will not start.

BACKUP_SERVICE_MANAGE_DATABASE_BACKUPS

This parameter enables or disables backup of the DIVArchive Oracle Database. The default value is Y (indicating yes, or enabled).

BACKUP_SERVICE_MANAGE_METADATA_BACKUPS

This parameter enables or disables backup of the Metadata Database. The default value is N (indicating no, or disabled).

You must set the following parameters in the DIVArchive Configuration Utility's Manager Setting tab. You must set the Metadata Database file location to an existing, valid location. The Manager uses this value to save the Metadata Database files. For example, F:\META_DATABASE_ROOT\.

Complex Objects Metadata Database Location

This is the path to the Metadata Database. There is no default path specified. The path must exist, and is validated by the DIVArchive Manager and the Backup Service. You must use a drive with ample storage. See Sizing the Metadata Database for information on calculating space requirements.

This parameter is not reloadable and is only checked one time when the Manager and the Backup Service services start. If you make any changes to this parameter you must restart the Manager and Backup Service.

Database Backup Notification

You select the desired notification level from the list as follows. The default setting is ERRORS AND WARNINGS. You must restart connected Control GUIs if any changes are made to this parameter.

ERRORS AND WARNINGS

Dialog box notifications are displayed in all connected Control GUIs when there is a Backup error or warning. Errors and warnings are also recorded in the event log. This is the default setting.

ERRORS

Dialog box notifications are displayed in all connected Control GUIs only for Backup errors. Errors and warnings are also recorded in the event log.

DISABLED

Dialog box notifications are disabled, but all of the errors and warnings are recorded in the event log.

Enable Metadata Database Feature

The DIVArchive Manager can archive complex objects and Backup Service can backup up the Metadata Database only when you enable this parameter (the check box is selected). When disabled (the check box is deselected) DIVArchive Manager cannot archive complex objects and the Backup Service cannot backup the Metadata Database. This parameter must be left at the default enabled setting.

This parameter is not reloadable and is only checked one time when the Manager and the Backup Service services start. You must restart the Manager and Backup Service services if any changes are made to this parameter.

If the BACKUP_SERVICE_MANAGE_METADATA_BACKUPS is set to Y (indicating yes, or enabled) in the Backup Service configuration file, the values of Enable Metadata Database Feature and Complex Objects Metadata Database Location in the Configuration Utility is validated when the Backup Service starts. If the Enable Metadata Database Feature parameter is set to N (indicating no, or disabled), or the Complex Objects Metadata Database Location is invalid, the Backup Service will fail to start.

You must set the following values on the Manager Setting tab of the Configuration Utility before starting the Manager and Backup Service services:

DIVAMANAGER_HOST

This parameter identifies the name of the computer where the Manager is installed. The default value is localhost.

DIVAMANAGER_PORT

This parameter identifies the port number the Manager is listening on for connections. The default value is 9000.

SERVICE_NAME

This parameter identifies the name of the Windows service. The default value is DIVArchive Backup.

SERVICE_PORT

This parameter identifies the port number where the service is running. The default value is 9300. You must change this value if it conflicts with other services.

DIVAMANAGER_DBHOST

This parameter identifies the IP address of the database to connect to from the Manager.

DIVAMANAGER_DBPORT

This parameter identifies the port number of the database to connect to from the Manager. The DIVArchive Database installation uses the Oracle default 1521 port number.

DIVAMANAGER_DBUSER

This parameter identifies the database user name; typically diva.

DIVAMANAGER_DBSID

This parameter identifies the Oracle Database SID (typically lib5) to connect to from the Manager.

BACKUP_SERVICE_MANAGE_DATABASE_BACKUPS

This parameter enables or disables backup of the DIVArchive Oracle Database. The default value is Y (indicating yes, or enabled).

BACKUP_SERVICE_MANAGE_METADATA_BACKUPS

This parameter enables or disables backup of the DIVArchive Metadata Database. The default value is N (indicating no, or disabled).

SCRIPT_FILES_DIRECTORY

This parameter identifies the DIVArchive Oracle Database Backup script location. By default, the scripts are copied to the %DIVA_HOME%\Program\DBBackup\rman\bin folder during the DIVArchive installation process. This parameter accepts both relative and absolute paths. If you use a relative path, you must assume the current directory is the %DIVA_HOME%\Program\DBBackup\bin folder. The default value is ..\rman\bin.

CYGWIN_BIN_DIRECTORY

This parameter identifies the location of the CYGWIN installation. The default is C:\cygwin\bin.

DB_BACKUP_LOCATION

This parameter identifies the location of the Oracle Database backup files. The default location is H:/oraback/lib5.

DB_BACKUP_REMOTE_DESTINATIONS

This parameter identifies the location of the Oracle Database remote backup destinations. All remote destinations must be an RSYNC service module name, following by a folder name. The backups must not be copied to the root of the RSYNC module. Multiple destinations are allowed and must be delimited by commas.

The default value is rsync://manager2/oraback/mgr1,rsync://actor3/oraback/mgr1.

The syntax for this setting is rsync://IP_Address/Module_Name/Folder_Name. For example, rsync://172.16.3.45/ORACLE_BACKUP/lib5.

FULL_BACKUP_START_HOUR_24

This parameter identifies the hour of day to perform a full database backup when the service is initially started. If the service is started later than the configured value, the full backup will occur at this hour on the following day. The default value is midnight; 0 hours.

FULL_BACKUP_START_MINUTE

This parameter identifies the number of minutes after the FULL_BACKUP_START_HOUR_24 hour to start the full backup. The default value is 0 minutes.

FULL_BACKUP_FREQUENCY_HOURS

This parameter identifies the frequency to execute a full backup of the database. The default value is every 24 hours.

INCREMENTAL_FREQUENCY_MINUTES

This parameter identifies the frequency to execute an incremental backup of the database. The default value is every 15 minutes.

The Backup Service will automatically determine if a full backup is required.

If the FBM_FREQUENCY_MINUTES parameter is not set, then this value is also used to notify the Manager how often to expect a message from the DIVArchive Backup Service. If a message is not received by the Manager within the incremental minutes, all connected Control GUIs are notified that the DIVArchive Backup Service may not be running. This event is then recorded in the event log. If the FBM_FREQUENCY_MINUTES is set, the Backup Service uses the lowest parameter value to notify the Manager how often to expect a message from the DIVArchive Backup Service.

By default, the Manager expects a message from the Backup Service within 15 minutes after the start of the Manager service. After the Backup Service is started and connected to the Manager, the Manager expects a message within every INCREMENTAL_FREQUENCY_MINUTES, or FBM_FREQUENCY_MINUTES value identified in the Backup Service configuration file.

FBM_BACKUP_REMOTE_DESTINATIONS

This parameter identifies the location of Metadata Database remote backup destinations. All remote destinations must be an RSYNC service module name, followed by a folder name. The backups must not be copied to the root of the RSYNC module. Multiple destinations are allowed, and must be delimited by commas.

The default value is rsync://manager2/oraback/mgr1,rsync://actor3/oraback/mgr1.

The syntax for this setting is rsync://IP_Address/Module_Name/Folder_Name. For example, rsync://172.16.3.45/ META_BACKUP/FBM.

FBM_FREQUENCY_MINUTES

This parameter identifies the frequency to execute a Metadata Database backup to all remote metadata backup destinations. The default value is every 15 minutes.

If the INCREMENTAL_FREQUENCY_MINUTES parameter is set, the Backup Service uses the lowest parameter value to notify the Manager how often to expect a message from the Backup Service.

A Metadata Database backup is executed when the services start.

DB_FBM_RECOVERY_WINDOW_DAYS

This parameter identifies the recovery window period for the Oracle Database and Metadata Database. This value indicates how many days of backups must be retained. Obsolete backup copies are then deleted. The default is 10 days.

The DIVArchive Backup Service sets this value using the RMANRecoveryWindow.bat file included in the DIVArchive Backup Service bin folder.

If this batch file is missing the DIVArchive Backup Service will not start.

CLEANUP_START_HOUR_24

This parameter identifies the hour of the day for initial start of the Backup Service clean up process to delete the obsolete backup copies. The default value is 2 (representing 2:00 AM).

CLEANUP_START_MINUTE

This parameter identifies the number of minutes after CLEANUP_START_HOUR_24 to start the clean up process. The default value is 0 (representing the top of the hour).

CLEANUP_FREQUENCY_HOURS

This parameter identifies the frequency to run the clean up process. The default value is every 24 hours.

See Monitoring the DIVArchive Backup Service for additional monitoring and notification options and configuration.

Installing and Starting the DIVArchive Backup Service

After verification of the DIVArchive Backup configuration file parameters, you must install and start the DIVArchive Backup Service using the following procedure:

  1. Confirm, that all of the prerequisites are in place. See DIVArchive Backup Service Prerequisites for details.

  2. Open a Windows command line.

  3. Change to the %DIVA_HOME%\Program\DBBackup\bin folder.

  4. The dbbackup.bat command-line syntax is dbbackup {command} [options].

The following list describes the dbbackup.bat commands:

install (or -i)

This command installs the DIVArchive Backup Service as a Windows service. You must install the Backup Service on the same server where the Manager and Oracle Database are installed.

uninstall (or -u)

This command uninstalls the DIVArchive Backup Service Windows service.

start

This command starts the DIVArchive Backup Service.

stop

This command stops the DIVArchive Backup Service.

restart

This command stops, and then subsequently restarts the DIVArchive Backup Service.

reconcile

This command lists the complex objects that are missing the Metadata Database files.

status

This command returns the current release level of the DIVArchive Backup Service, the IP address and port that it is installed on, and the state of the service. Current states are Running and Not Running.

If the state is Not Running after an attempt to start has failed, you must review the logs to determine why the service could not start.

The following are two example outputs using the status command:

Service (on 127.0.0.1:9300) is running.
Service (on 127.0.0.1:9300) is not running.
version (or -v)

This command displays the Backup Service release information and then exits.

help (or -h)

This command displays dbbackup command help information and then exits.

There is only one dbbackup command-line option as follows:

-conf (or -f)

This option identifies a specific configuration file to load the settings from. The default is %DIVA_HOME%\Program\conf\db_backup\backup.conf.

Installing and Configuring the Windows RSYNC Service and Module

The DIVArchive Backup Service incrementally replicates Oracle Database backup files and Metadata files to remote backup servers. After you install CYGWIN, you must install the RSYNC service and RSYNC modules. The RSYNC modules provide a logical name for the backup location path. You must configure the DIVArchive Manager server, DIVArchive Backup Manager server, DIVArchive Database server, and all remote backup systems using the following procedure:

Note:

The DIVArchive Prerequisite Package installs CYGWIN and performs the RSYNC Configuration. The following steps only need to be performed when the DIVArchive Prerequisite Package is not used for installing CYGWIN.
  1. Open a command-line window and execute the following command:

    %CYGWIN_HOME%\bin\cygrunsrv -I rsyncd -d "RSYNC Daemon" --path /usr/bin/rsync --args '--config=/etc/rsyncd.conf --no-detach --daemon --quiet' -e CYGWIN='binmode tty nontsec'
    
  2. Open the %CYGWIN_HOME%\etc\rsyncd.conf configuration file and add a new module using the following syntax. Oracle recommends configuring RSYNC modules to point to the same directory on the Main Backup server, and all Remote Backup servers.

    Note:

    The square brackets are required for the [Module_Name] statement. Therefore, in the example, [ORACLE_BACKUP] and [METADATA_BACKUP] must include the brackets.
    [Module_Name]
    path = {cygwin_style_path}
    comment = {Description}
    

    Example:

    [ORACLE_BACKUP]
    path = /cygdrive/h/oraback
    comment = Oracle backups
    
    [METADATA_BACKUP]
    path = /cygdrive/h/metaback
    comment = Metadata Database backups
    
  3. You can now start the RSYNC service from the Windows Service Manager, or execute %CYGWIN_HOME%\bin\cygrunsrv -S rsyncd to start it from the command line.

Installing and Configuring the Linux RSYNC Service and Module

RSYNC for Linux is added as part of the divaservice. The following is the divaservice information displayed when you execute the ./divaservice command without any options:

[diva@linux008 Program]$ ./divaservice

runuser: user oracle does not exist
Warning: Unable to get Oracle SID

Usage ./divaservice configure <SERVICE>
Usage ./divaservice install <SERVICE> <configuration file as absolute path>Usage ./divaservice start-all | stop-all | restart-all
Usage ./divaservice start | stop | restart | uninstall | status <SERVICE_NAME>
Usage ./divaservice list
Usage ./divaservice profile

SERVICE: manager actor robotmanager migrate dfm dbbackup lynxlocaldelete spm rsyncDaemon

Example:

First, you must execute sh divaservice install rsyncDaemon /home/diva/DIVA/7_4_0_35/Program/conf/rsync/rsync.conf to install the service.

After the service is installed, you must execute sh divaservice start rsyncDaemon to start the service.