The Backup Service (staservadm) can automate database backups. Once enabled, the service runs in the background and performs a routine set of processes.
Once a day, at the time you have specified, the service:
Uses the mysqldump
command to create a high-speed dump of the current STA database.
Transfers all existing backup files to the location you have specified. This includes the following files:
Database dump file just created
Compressed STA services and WebLogic configuration directories
All incremental backups (binary log files) created within the last 24 hours
These files are purged from the local STA server, but if you are doing remote backups, the Backup Service never deletes files from the external server. For remote backups, the files are compressed before being transferred to the external server.
Opens a new binary log file to save database changes that occur from this point forward.
Periodically, at the time interval you have specified, the service closes the current binary log file and opens a new one. This step is repeated at the sleep interval specified until the next full backup.
A full backup, or database dump, is a complete record of the STA database schema and data contents at a point in time. The Backup Service creates a dump once a day at the time you have defined with the staservadm
utility.
Each dump file is assigned the following name:
datestamp_timestamp.stafullbackup.sql
where:
datestamp
is the current date in yyyymmdd
format.
timestamp
is the current time, in hhmmss
format.
For example, 20200114_180525.stafullback.sql
would be a database dump file created on January 14, 2020 at 18:05:25.
Files for the most recent full backup (full database dump) are located in the /
backup_directory
/local
directory on the STA server, where backup_directory
is the database backup location specified during installation (see the STA Installation and Configuration Guide for details). The Backup Service automatically creates the local
subdirectory if it does not exist already.
The Backup Service automatically removes the previous day's full backup files from this directory when it completes each day's full backup.
If you are not doing remote backups, this is the only backup retained by the Backup Service. You have only one day's full backup on the local STA server.
If you are doing remote backups, compressed copies of all full backup files are also located in the remote backup directory defined with the staservadm
utility.
The Backup Service never deletes files from the external backup server, enabling you to maintain as many days worth of backups as your site's policies require. It is your responsibility to manage the files and the space on the external server. You can use your site's preferred backup and archiving policies and tools to manage the files.
When the Backup Service does a full database dump, it also creates compressed copies of the configuration directories for the STA services and WebLogic server. These are recursive backups of all the files and directories in their respective configuration directories.
The file names are as follows:
datestamp_timestamp.conf.zip
datestamp_timestamp.fmwconfig.zip
where:
datestamp
is the current date in yyyymmdd
format.
timestamp
is the current time, in hhmmss
format.
For example, 20200114_180525.conf.zip
and 20200114_180525.fmwconfig.zip
would be compressed WebLogic and STA services configuration directories, respectively, created on January 14, 2020 at 18:05:25.
Compressed copies of the STA services and WebLogic configuration directories are located in the same directory as the full database dump files, and the STA Backup service manages these files in the same manner as the database dump files.
An incremental backup, or binary log, records changes to the database that have occurred since the last backup. The incremental backups are significantly smaller than a full database backup. The logs are saved in binary format.
To do a full database restore, you load the most recent full dump file and then apply, in sequential order, all the incremental backups that were generated after the dump. This process enables you to restore the database to its state up to the last transaction recorded in the binary logs.
Each binary log is assigned the following file name:
stadb-bin.nnnnnn
where:
nnnnnn
is a unique number indicating the sequence in which the incremental backups were created.
For example, stadb-bin.000034
, stadb-bin.000035
, and stadb-bin.000036
could be three successive incremental backups created by the STA Backup service.
All incremental backups created since the last full backup are located in the /var/log/tbi/db
directory on the STA server. The number of binary log files in the directory depends on the incremental backup interval you have specified.
The Backup Service removes all incremental backups from the /var/log/tbi/db
directory when it completes a daily full backup. Therefore this directory only contains incremental backup files created since the last full backup. You should never delete binary log files from this directory yourself.
If you are not doing remote backups, the incremental backups are deleted from this directory and not retained anywhere.
If you are doing remote backups, the incremental backups are transferred to the remote backup directory every 24 hours, when the compressed full database dump files are moved. You can keep as many days worth of incremental backups on the backup server as your site's policies require.