Use these procedures to configure the STA Backup service and STA Resource Monitor service utilities.
This chapter includes the following sections:
STA database backup service—You configure the STA backup service with its administration utility, staservadm. To display a complete list of command options for the utility, type staservadm -h. See the STA Administration Guide for details.
STA resource monitor service—You configure the STA resource monitor service with its administration utility, staresmonadm. To display a complete list of command options for the utility, type staresmonadm -h at the command line. See the STA Administration Guide for details.
These service utilities are located in the /Oracle_storage_home/StorageTek_Tape_Analytics/common/bin directory. See "Users, Groups, and Locations Used by the STA Installer" for details about the Oracle storage home.
General Tasks
STA Database Backup Configuration Tasks
STA Resource Monitor Configuration Tasks
Use this procedure to ensure that the STA bin directory is included in the PATH variable for the system root user. The bin directory includes the STA service utilities, staservadm and staresmonadm.
Open a terminal session on the current STA server, and log in as the system root user.
Use a text editor to open the user profile. For example:
# vi /root/.bash_profile
Add the STA bin directory to the PATH definition. For example, add the following line to the file:
PATH=$PATH:Oracle_storage_home/StorageTek_Tape_Analytics/common/bin
Where Oracle_storage_home is the Oracle storage home location specified during STA installation.
Save and exit the file.
Log out and log back in as the system root user.
Confirm that the PATH variable has been updated correctly.
# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/Oracle/StorageTek_Tape_Analytics/common/bin
Use this procedure to restart the STA Services daemon, staservd.
This procedure is useful if you changed the configuration settings of the STA Backup or STA Resource Monitor services and you want the new settings to take effect immediately. If you do not use this procedure, the new settings will take effect as soon as the service wakes up from its sleep interval and processes them.
Stop the STA Services daemon.
# STA stop staservd
Start the STA Services daemon.
# STA start staservd
Display the status of the daemon to confirm that it is running.
# STA status staservd
When you have finished configuring the services, confirm that all configured libraries have completed their "Get latest data" requests (Last Connection Status should indicate SUCCESS, and STA should be receiving exchange data from the libraries). See the STA User's Guide for details.
Review Table 7-1 for descriptions of the available preference settings and to define your settings.
Table 7-1 STA Backup Service Administration Utility (staservadm) Attributes
Option | Attribute | Description | Default Value | Your Value |
---|---|---|---|---|
-S, --scp -F, --ftp |
File transfer type |
Method of file transfer used to copy the backup files from the STA server to the backup host. Options are SCP (recommended) or FTP. |
SCP |
|
-T, --time |
Full backup dump time |
Time of day STA performs a full database backup dump. The dump is performed automatically every 24 hours at approximately this time. The actual time is sometime within "sleep interval" seconds after this time. Format is hh:mm, using 24-hour time. |
00:00 |
|
-i, --int |
Sleep interval |
Number of seconds the STA Services daemon waits before checking for new incremental backup files. |
300 |
|
-s, --server |
Backup host name |
IPv4 or IPv6 address or fully qualified DNS host name of the server host to which the STA server copies its backup files. |
NA |
|
-u, --usr |
Backup user ID |
System user ID authorized to perform SCP file transfers to the backup host. |
NA |
|
-p, --pwd |
Backup password |
Password assigned to the backup user. |
NA |
|
-d, --dir |
Backup directory |
Directory on the backup host where the backup files will be copied. |
NA |
|
-U, --dbusr |
Database username |
Database username authorized to perform a mysqldump command. You should specify the STA Database DBA Account username. |
NA |
|
-P, --dbpwd |
Database password |
Password of the database username. |
NA |
Use this procedure to configure a remote backup server (or equivalent) to receive the compressed backup files generated by the STA database backup service. Oracle recommends that you configure a remote backup server.
The required space is variable—the size should be a multiple of the size used for the STA database local backup, depending on the number of copies to be retained. Backup server storage should be mirrored or striped.
On the backup server, log in as the system root user.
Create a new group for the STA Backup user. For example:
# groupadd -g 54321 stabckgr
In this example, the group ID is "stabckgr", and the -g option is used to specify a numerical GID.
Create the STA Backup user. For example:
# adduser stabck -c "STA database backup user" -m -d /home/stabck -g stabckgr -s /bin/bash -u 98765
In this example, the user ID is "stabck", and the following options are used:
-c – Comment.
-m – Create a home directory for the user.
-d – Absolute path of the home directory.
-g – Assign the user to the specified group.
-s – Assign the specified login shell to the user.
-u – Assign the specified numerical UID to the user.
Assign a password to the STA Backup user. For example:
# passwd stabck
Changing password for user stabck.
New UNIX password: bckpwd1
Retype new UNIX password: bckpwd1
passwd: all authentication tokens updated successfully.
Create the directory where the STA backups will be copied. For example:
# cd /home/stabck # pwd /home/stabck # mkdir -p STAbackups # ls STAbackups
In this example, the "STAbackups" directory is created in the STA Backup user's home directory, and the -p option is used to make parent directories as needed.
Display the user attributes to confirm that all information has been entered correctly. For example:
# cat /etc/passwd |grep sta
stabck:x:98765:54321:STA database backup user:/home/stabck:/bin/bash
Assign exclusive ownership and access rights for the directory to the STA Backups user and group. For example:
# chown -R stabck:stabckgr STAbackups # chmod -R 700 STAbackups # chmod 755 /home/stabck
In this example, the -R option is used to recursively assign the attributes to the directory and its files.
List the directory to confirm that all information has been entered correctly. For example:
# ls -la |grep STA
drw------- 2 stabck stabckgr 4096 Oct 19 14:20 STAbackups
Use this procedure to configure the STA database backup service. You can designate a directory where the backup files will be copied. Oracle recommends that this directory be located on a remote backup server.
Your configuration settings take effect as soon as the service wakes from its current sleep interval and processes new settings or you manually restart the STA Services daemon ("Restart the STA Services Daemon (optional)").
On the STA server, log in as the system root user.
Display the current STA Backup Service settings using the staservadm -Q command.
This example shows that the service is not yet configured and is therefore not performing backups.
# ./staservadm -Q
Contacting daemon...connected.
Querying Preferences.
Current STA Backup Service Settings:
Configured [no]
File Transfer -S [SCP]
Full Backup -T [00:00]
Sleep Interval -i [300 sec]
Backup Hostname -s []
Backup Username -u []
Backup Password -p []
Backup Directory -d []
Database Username -U []
Database Password -P []
Using Table 7-1 as a reference, set the attribute values with the staservadm command.
You can submit the attributes in separate commands or combine them into one. For example:
# ./staservadm -S -T 11:00 -i 350 -s stabaksvr -u stabck -p bckpwd1 -d /home/stabck/STAbackups -U sta_dba -P password1
The utility sets each value included in your command and then displays all current settings. For example:
Contacting daemon...connected. Setting File Transfer Type... SCP Setting Sleep Interval....... 350 Setting Backup Hostname...... stabaksvr Setting Backup Username...... stabck Setting Backup Password...... ******* Setting Backup Directory..... /home/stabck/STAbackups Setting Full Backup Time..... 11:00 Setting Database Username.... sta_dba Setting Database Password.... ********* Done. Current STA Backup Service Settings: Configured [yes] File Transfer -S [SCP] Full Backup -T [11:00] Sleep Interval -i [350 sec] Backup Hostname -s [stabaksvr] Backup Username -u [stabck] Backup Password -p [*******] Backup Directory -d [/home/stabck/STAbackups] Database Username -U [sta_dba] Database Password -P [*********]
Review the command output to verify that the values have been set correctly.
Review the option descriptions in Table 7-2 and define your settings. A default value of "-1" indicates the attribute has not been configured.
Table 7-2 STA Resource Monitor (staresmonadm) Attributes
Option | Attribute | Description | Default Value | Your Value |
---|---|---|---|---|
-T, --time |
Daily report time |
Time of day STA sends a standard daily report. The report is sent automatically every 24 hours at approximately this time. The actual time is sometime within "sleep interval" seconds after this time. Format is hh:mm, using 24-hour time. |
00:00 |
|
-i, interval |
Sleep interval |
Number of seconds the STA Resource Monitor waits between scans. |
300 |
|
-n, --nag |
Nag mode |
Indicates how frequently STA alerts if any high watermarks are reached. If set to "on", STA sends alert emails every time the system is scanned. If set to "off", alerts are simply noted in the standard daily report. |
Off |
|
-U, --dbusr |
Database username |
Database username authorized to perform queries against the "information_schema" tables and the MySQL server internal system global variables. You should specify either the STA Database DBA Account username or STA Database Root Account username (root). |
NA |
|
-P, --dbpwd |
Database password |
The password assigned to the database username. |
NA |
|
-t, --tblsphwm |
Database tablespace HWM |
High watermark for the database tablespace, entered as a percentage of the maximum available. |
-1 |
|
-b, --backvolhwm |
Local backup HWM |
High watermark for the STA database local backups volume (/sta_db_backup), entered as a percentage of the maximum possible. |
-1 |
|
-d, --dbvolhwm |
Database disk volume HWM |
High watermark for the STA database volume (/sta_db/mysql), entered as a percentage of the maximum available. |
-1 |
|
-l, --logvolhwm |
Logging disk volume HWM |
High watermark for the STA database logs /STA_logs/db), entered as a percentage of the maximum available. |
-1 |
|
-z, --rootvolhwm |
Root volume HWM |
High watermark for the root volume (/), entered as a percentage of the maximum available. |
-1 |
|
-x, --tmpvolhwm |
Tmp volume HWM |
High watermark for the temporary directory volume (/tmp), entered as a percentage of the maximum available. |
-1 |
|
-m, --memhwm |
Physical memory (RAM) HWM |
High watermark for the total system memory (except virtual memory), entered as a percentage of the maximum available. |
-1 |
|
-f, --from |
Email from |
Name or email address that appears in the "From" field of the standard daily report email. |
StaResMon@localhost |
|
-r, --recips |
Email recipients |
Recipient email addresses, entered as a colon-delimited list. |
NA |
|
-s, --subject |
Email subject |
Entry that appears in the "Subject" field of the standard daily report email, up to 128 characters. Use quotes if it contains spaces. A timestamp in yyyy-mm-dd hh:mm:ss form will be appended to your entry when the email is sent. |
STA Resource Monitor Report |
|
-o, --outfile |
Output data file |
Absolute path of the comma-separated (CSV) output data file. |
/STA_logs/db/staresmon.csv For example: /var/log/tbi/db/staresmon.csv |
Use this procedure to configure the STA Resource Monitor service. Your configuration settings take effect as soon as the service wakes from its current sleep interval and processes new settings or you manually restart the STA Services daemon ("Restart the STA Services Daemon (optional)").
On the STA server, log in as the system root user.
Display the current STA Resource Monitor settings using the staresmonadm -Q command.
This example shows the service is not yet configured and is therefore not performing scans.
# ./staresmonadm -Q
Contacting daemon...connected.
Querying Preferences.
Current STA Resource Monitor Service Settings:
Configured [no]
Send Reports -T [00:00]
Sleep Interval -i [300 sec]
Alert Nagging -n [off]
DB Username -U []
DB Password -P []
DB Tablespace hwm -t [-1%]
DB Backup hwm (/dbbackup) -b [-1%]
DB Data hwm (/dbdata) -d [-1%]
Log Volume hwm (/var/log/tbi) -l [-1%]
Root Volume hwm (/) -z [-1%]
Tmp Volume hwm (/tmp) -x [-1%]
System Memory hwm -m [-1%]
Email 'From:' -f [StaResMon@localhost]
Email 'To:' -r []
Email 'Subject:' -s [STA Resource Monitor Report]
Output File -o [/var/log/tbi/db/staresmon.csv]
Using Table 7-2 as a reference, set the attribute values with the staresmonadm command.
You can submit the attributes in separate commands or combine them into one. For example:
# ./staresmonadm -T 13:00 -i 600 -n on -U sta_dba -P password1 -t 65 -b 65 -d 65 -l 65 -z 70 -x 80 -m 75 -r john.doe@company.com
The utility sets each value included in your command and then displays all current settings. For example:
Contacting daemon...connected. Setting DB Tablespace HWM..... 65 Setting DB Disk Volume HWM.... 65 Setting Logging Volume HWM.... 65 Setting Backup Volume HWM..... 65 Setting Root Volume HWM....... 70 Setting Temp Volume HWM....... 80 Setting System Memory HWM..... 75 Setting 'To:' addresses....... john.doe@company.com Setting Send Time............. 13:00 Setting Sleep Interval........ 600 Setting Alert Nag Mode........ ON Setting DB Username........... sta_dba Setting DB Password........... ********* Done. Current STA Resource Monitor Service Settings: Configured [yes] Send Reports -T [13:00] Sleep Interval -i [600 sec] Alert Nagging -n [on] DB Username -U [sta_dba] DB Password -P [*********] DB Tablespace hwm -t [65%] DB Backup hwm (/dbbackup) -b [65%] DB Data hwm (/dbdata) -d [65%] Log Volume hwm (/var/log/tbi) -l [65%] Root Volume hwm (/) -z [70%] Tmp Volume hwm (/tmp) -x [80%] System Memory hwm -m [75%] Email 'From:' -f [StaResMon@localhost] Email 'To:' -r [john.doe@company.com] Email 'Subject:' -s [STA Resource Monitor Report] Output File -o [/var/log/tbi/db/staresmon.csv]
Review the command output to verify that the values have been set correctly.