Archive logs are stored in the Oracle RAC environment in the following ways:
1. Local File System
2. Cluster File System
3. Network File System (NFS)
4. Automatic Storage Management (ASM)
The storage method of archive logs determines the backup method that can be used for archiving logs. For Methods 2, 3, and 4, the backup of archived logs is the same as that of archived logs on a single instance. For method 1, the backup of archived logs is more complex, you can back up each node, or set it on the backup software (Veritas Netbackup only), and then back up the archived logs of all nodes in a unified manner. However, you must pay attention to the recovery of archived logs. The Archive generated by all threads should be visible to the application archived instances.
Method 2, 3, and 4. The RMAN script is as follows:
RUN {
Allocate channel ch00 device type sbt;
SQL 'alter system archive log current ';
BACKUP
FORMAT 'arch _ % d _ % s _ % p _ % t'
(Archivelog all delete input );
Release channel ch00;
}
Note: The following error may occur when you use NFS to back up archived logs:
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
There are two solutions to this error:
1. Specify rszie and wsize greater than or equal to 32768 when mounting the NFS file system.
2. Add *. event = '10298 trace name context forever, level 32' to the database parameter file to skip oracle10g's NFS file system check.
For method 1, The RMAN script is as follows:
Method 1: the path specified after like can be divided into archives of different threads. The RMAN script is as follows:
RUN {
Allocate channel ch00 device type sbt;
SQL 'alter system archive log current ';
BACKUP
FORMAT 'arch _ % d _ % s _ % p _ % t'
(Archivelog like '/archive2/%' delete input );
Release channel ch00;
}
Method 2: perform specific settings in Veritas Netbackup
First, set TNS to connect to different nodes, and then create two policies in NBU. Configure Y1 to specify the Backup script. The Backup script for release Y2 is empty, and configure Application Backup Type schedule for release Y2. The RMAN script is as follows:
RUN {
Allocate channel ch00 device type sbt connect 'sys/sys @ node1' parms \ "ENV = (NB_ORA_POLICY = node1_policy, NB_ORA_CLIENT = node1_vip )\";
Allocate channel ch01 device type sbt connect 'sys/sys @ node2' parms \ "ENV = (NB_ORA_POLICY = node2_policy, NB_ORA_CLIENT = node2_vip )\";
SQL 'alter system archive log current ';
BACKUP
FORMAT 'arch _ % d _ % s _ % p _ % t'
(Archivelog all );
Release channel ch00;
Release channel ch01;
}