View Backup Information

Use a terminal session on the STA server to view information about the backups.

View Log Entries for a Backup

View STA server log entries for a backup.

  1. Open a terminal session on the STA server, and log in as the Oracle user.

  2. Change to the STA services log directory.

    $ cd /var/log/tbi/db/backups
    
  3. Use any of the following searches to find log entries for the backup.

    You may need to search more than one log file to find the applicable entries. Depending on the amount of log activity and when the backup was performed, entries for the backup in question may be in the current log file (staservd.log.0) or an earlier one (staservd.log.1, staservd.log.2, and so on).

    • Display all backups recorded in the staservd.log.1 log file.

      $ grep 'StaBackup' staservd.log.1 | grep 'Database dump completed'
      
    • Refine the search to display entries just for the backup in question. This example shows entries for the backup done on January 23, 2020.

      $ grep 'StaBackup' staservd.log.1 | grep 20200123
      
    • Refine the search to display the name of the host where the files for the backup in question were sent.

      $ grep 'StaBackup' staservd.log.1 | grep 20200123 | grep 'sending file'
      

List All Files for a Full Database Dump

Verify that files for a full backup have been successfully saved to the right location and check the size of the files.

  1. Open a terminal session on the applicable server, and log in as the Oracle user.

  2. Change to the backup directory.

    The backup directory may be on the local STA server or an external server. Oracle recommends backing up the database to an external backup server. The backup location is defined by the staservadm utility. See Display Current STA Backup Settings for instructions on displaying the location.

    The following example shows an external backup server.

    $ cd /remote_backups/stabackups
    
  3. List the files for the backup in question. This example includes the following files for the full backup done on January 23, 2020.

    • A full dump of the STA database, identified by the file name ending in stafullbackup.sql.

    • MySQL server configuration files, identified by the file name ending in fmwconfig.zip.

    • STA services configuration files, identified by the name ending in conf.zip.

    $ ls -l *20200123*
    
    -rw-r--r-- 1 oracle oinstall  11081 Jan 23 17:02 20200123_170250.conf.zip.gz
    -rw-r--r-- 1 oracle oinstall 195524 Jan 23 17:02 20200123_170250.fmwconfig.zip.gz
    -rw-r--r-- 1 oracle oinstall  37968 Jan 24 17:03 20200123_170250.stadb-bin.000028.gz
    -rw-r--r-- 1 oracle oinstall 461721 Jan 23 17:02 20200123_170250.stafullbackup.sql.gz
    

List Incremental Backup Files (Binary Logs)

View the incremental backups (binary log files) created since the last full backup. Incremental backups are always located on the local STA server.

Note:

Frequent incremental backups can generate a significant number of binary log files that may consume considerable hard drive space. You may want to purge old binary logs periodically.
  1. Open a terminal session on the STA server, and log in as the Oracle user.

  2. Change to the incremental backup directory.

    $ cd /var/log/tbi/db
    
  3. List the directory. This example shows the following incremental backup files:

    • Incremental backups (binary log files), which have the file names stadb-bin.000028 and stadb-bin.000029. These files are created at the intervals defined with the staservadm utility.

    • Index file for the binary log files, which has the name stadb-bin.index.

    • "Slow queries" log, which has the name stadb-slow.log. This log lists MySQL queries that take a long time to execute and is a tool used by Oracle Service and development.

    $ ls -l
    total 876
    drwxr--r-- 2 oracle oinstall   4096 Jan 24 02:52 backups
    -rw-rw---- 1 oracle oinstall 161351 Jan 24 17:03 stadb-bin.000028
    -rw-rw---- 1 oracle oinstall 146592 Jan 25 14:55 stadb-bin.000029
    -rw-rw---- 1 oracle oinstall     66 Jan 24 17:03 stadb-bin.index
    -rw------- 1 oracle oinstall   6561 Jan 24 17:03 stadb-slow.log
    

Verify a Local Backup

Verify the local backup was completed on a particular date.

  1. Open a terminal session on the STA server, and log in as the Oracle user.

  2. List the STA services log directory. For example:

    $ ls -l /var/log/tbi/db/backups
    
  3. To determine which backups have been performed recently:

    $ grep 'StaBackup' staservd.log.0 | grep 'Database dump completed'
    
  4. Verify that the latest backup was saved correctly:

    1. Change to the local backup subdirectory for your site. For example:

      $ cd /dbbackup/local
      
    2. List the directory. It should contain the most recent backup files, including a full database dump and configuration files, created by the Backup Service.

      $ ls –l
      

View Binary Log Contents

When restoring the database, you may not want to apply an entire incremental backup file if you suspect it contains corrupted database operations. View the contents of the binary log to identify valid events.

To view binary log events, you must use the MySQL mysqlbinlog utility. The utility converts the binary file contents to text form. See the mysqlbinlog utility reference for complete details.

The following shows an example of the binary log content:

$ mysqlbinlog stadb-bin.000016 | more 
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#160125 17:03:36 server id 1  end_log_pos 120 CRC32 0x2a76ef3b  Start: binlog v 4, server v 5.6.18-enterprise-commercial
-advanced-log created 160125 17:03:36
BINLOG '
2LemVg8BAAAAdAAAAHgAAAAAAAQANS42LjE4LWVudGVycHJpc2UtY29tbWVyY2lhbC1hZHZhbmNl
ZC1sb2cAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAATvv
dio=
'/*!*/;
# at 120
--More--