Backup/recovery scripts that use OPC, an advanced copy feature of the Fujitsu Storage ETERNUS disk array (hereafter referred to as ETERNUS disk array), are supplied as copy command samples for use by the pgx_dmpall and pgx_rcvall commands.
Users can copy the samples to any file and make changes appropriate to their environment or operations.
The samples are stored in the directories below:
Basic version
/installDir/share/copy_command.esf_acm1.sh.sample
Advanced version
/installDir/share/copy_command.esf_acm2.sh.sample
See
The samples use the replication management command of the Fujitsu Storage ETERNUS SF AdvancedCopy Manager (hereafter referred to as ACM) for operating the advanced copy features of the ETERNUS disk array. Refer to the relevant manual for details.
Prerequisite for using the samples
To use the samples, it is necessary to configure the settings of the advanced copy features of the ETERNUS disk array in advance. The samples assume that the replication source/volume has been configured, its contents have been physically copied to the replication volume, and that the tracking process has been started.
Sample content (advanced version)
The sample uses two replication volumes as the replication source on which the database cluster and tablespace are located, alternating between them for each backup. It then registers to the backup information file the replication volume (group) used for the latest backup.
In addition, the backup information file is also used to determine the replication volume to restore during recovery.
The processing for each operation mode is described below:
The backup information file is read, and the replication volume to be used for the current backup is determined.
The completion status of physical copies to all replication volumes is checked using the swsrpstat command of ACM.
The replication volume determined in step 1 is written to a temporary file for later use by the backup mode.
The temporary file is read, and the replication volume information is retrieved.
The file system buffer is written using the sync command of the operating system.
The file system targeted for backup is frozen using the fsfreeze command of the operating system.
Snapshot retrieval (implementation of a logical copy) is performed using the swsrpmake command of ACM.
The file system frozen in step 3 is unfrozen using the fsfreeze command of the operating system.
Steps 3 to 5 are performed for all file systems targeted for backup.
The completion status of physical copies to all replication volumes is checked using the swsrpstat command of ACM.
Information about the replication volume used for the current backup is written to the backup information file.
The backup information file is read, and the replication volume to be used for recovery is determined.
The file system targeted for recovery is unmounted using the umount command of the operating system.
Physical copy from the replication volume is performed using the swsrpmake command of ACM.
The file system targeted for recovery is mounted using the mount command of the operating system.
The completion status of physical copy from the replication volume is checked using the swsrpstat command of ACM.
Steps 2 to 5 are performed for all file systems targeted for recovery.
Files and directories not needed for archive recovery are deleted.
Note
The samples cannot be used on SLES 15.
The samples use the sudo command of the operating system so that operation of the commands and file systems of ACM is performed by the superuser of the operating system. Therefore, determine if these implementations satisfy the security standards on the database server, and if necessary, perform implementations using other means.
The samples temporarily freeze the file system of the data storage destination (replication source volume) to protect the file system from copy processing by advanced copy features of the ETERNUS disk array. Therefore, consider the following:
Consider freeze time during the timeout period of an SQL statement.
When using a feature that links with the database, such as a cluster feature that accesses the data storage destination, consider freeze time in relation to the timeout periods below.
When performing database multiplexing
Misdetection may occur during abnormality monitoring, so it is necessary to consider the monitoring interval, timeout period and number of retries for abnormality monitoring, and consider temporarily stopping only the Mirroring Controller process during backup.
When performing failover operations using PRIMECLUSTER
If a failure occurs while the file system is frozen, switching is triggered when PRIMECLUSTER detects an issue, but will be performed only after the system is unfrozen. In addition, if it takes time for the system to unfreeze, the active node may trigger operating system panic, resulting in a switch.