2.2 ¿Qué principios se deben seguir para elaborar referencias bibliográficas?
2.4. Registro de las fuentes
Use the backup command to create one or more backup sets. Each resulting backup set contains one or more datafiles, datafile copies, or archivelogs from the target database. You can also place a backup of the control file into a datafile backup set. A file cannot be split across different backup sets. Archivelogs and datafiles cannot be mixed into a single backup set.
The number of backup sets produced during a backup depends on the number of
backup_specifications in the command, the number of files specified or implied in
each backup_object_list, and the value of the FILESPERSET limit. Each
backup_specification produces at least one backup set. If the number of files specified
or implied in its backup_object_list exceeds the FILESPERSET limit, then the
backup_specification will produce multiple backup sets. If no limit is specified, then
each backup_specification produces exactly one backup set.
If multiple backup sets are to be created and multiple channels are allocated, then Recovery Manager automatically parallelizes its operation and writes multiple
Note: If the database is in ARCHIVELOG mode, it is not neces- sary to shutdown cleanly for a cold backup. However, Oracle rec- ommends you do so that the backup is consistent.
Backing Up Files
backup sets in parallel. A single backup set cannot be striped across multiple channels. Recovery Manager automatically assigns a backup set to a device. It is possible to specify that all backup sets for a backup_specification be written to a specific channel.
Types of Recovery Manager Backups The backup_type applies to all backup_specifications in the backup_specification_list. The following two backup types are available: full
This is the default if neither full nor incremental is specified. A full backup copies all blocks into the backup set, skipping only datafile blocks that have never been used. No blocks are skipped when backing up archivelogs or control files.
A full backup has no effect on subsequent incremental backups, and is not considered to be part of the incremental backup strategy.
incremental
An incremental backup at a level greater than 0 copies only those blocks that have changed since the last incremental backup. An incre- mental backup at level 0 is identical in content to a full backup, but the level 0 backup is considered to be part of the incremental strategy. Certain checks are performed when attempting to create an incremen- tal backup at a level greater than zero. These checks ensure that the incremental backup would be usable by a subsequent recover com- mand. Among the checks performed are:
- A level 0 backup set must exist, or level 0 datafile copies must exist for each datafile in the backup command. These must also not be marked unavailable.
- Sufficient incremental backups taken since the level 0 must exist and be available such that the incremental backup about to be created could be used.
Multiple levels of incremental backup are supported. A level N incre- mental backup copies only those blocks that have changed since the most recent incremental backup at level N or less.
If incremental is specified, then all backup_object_lists in the command must specify one of the following: datafile, datafilecopy, tablespace, or
database. Incremental backups of control files, archivelogs or backup sets are not supported.
Backup Command Operand List
You can specify a number of operands that apply to the entire backup command. Some of these operands may also be specified at the backup_specification level. tag
A backup set can be given a user-specified identifier called a tag, which is a character string that is not a reserved word, typically with a mean- ingful name like “monday_evening_backup” or
“weekly_full_backup”. Tags must be 30 characters or less.
The syntax allows specification of the tag at the backup_command level or the backup_specification level. If specified at the command level, then all backup sets created by this command are given this tag. If specified at the backup_specification level, then backup sets created as a result of different backup specifications can have different tags. If specified at both levels, then the tag in the backup_specification takes precedence. cumulative
Causes an incremental backup to re-copy all the blocks that the previ- ous backup at the same level copied, in addition to those blocks that have changed in the interim.
nochecksum
This suppresses block checksums. Unless this option is specified, a checksum is computed for each block and stored in the backup. The checksum is verified when restoring from the backup and also written to the datafile when restored.
If the database is already maintaining block checksums, then this flag has no effect. The checksum is always verified and stored in the backup in this case.
filesperset
This specifies the maximum number of files to place in one backup set. If the number of files specified or implied by the backup specification is greater than filesperset, then the backup specification will cause mul- tiple backup sets to be created.
When you specify this parameter, Recovery Manager uses the mini- mum value of the calculated and specified value, which ensures that all devices are used. If you do not specify filesperset, the Recovery Man- ager uses the minimum value of the calculated value and 64, again
Backing Up Files
ensuring that all channels are used, but limiting the number of files in a backup set.
Recovery Manager always attempts to create enough backup sets so that all allocated channels have work to do. An exception to this occurs when there are more channels than files to back up.
setsize
This enables users to specify a maximum size for a backup set. The limit is specified in units of 1K (1024 bytes). Thus, to limit a backup set to 3Mb, you would specify setsize=3000. Recovery Manager attempts to limit all backup sets to this size. This is a particularly useful option when you wish to make each backup set no larger than 1 tape. Backup Specification List
A backup_specification_list contains a list of one or more backup_specifications. A
backup_specification minimally contains a list of objects to backup and a format
operand to specify a filename template for the backup pieces.
Each backup_specification creates one or more backup sets. A backup_specification will cause multiple backup sets to be created if the number of datafiles specified in or implied by its backup_object_list exceeds the filesperset limit.
Backup Object List
Each backup_specification contains exactly one backup_object_list. The
backup_object_list specifies which objects to backup. database
Indicates all datafiles, in addition to the control file, are backed up. tablespace
This specifies a list of one or more tablespaces to back up. All datafiles that are currently part of the tablespaces will be backed up. Any num- ber of tablespaces can be specified.
The keywords database and tablespace are provided merely as a con- venience. These forms are translated internally into a list of datafiles. datafile
This specifies a list of one or more datafiles to back up. Datafiles can be specified either by filename or by datafile number. If a filename is speci- fied, then it must be the name of a current datafile as listed in the recov-
ery catalog (when a recovery catalog is used); otherwise, as listed in the control file.
If file1 (the first file of the system tablespace) is backed up, the control file is automatically included.
datafilecopy
This specifies a list of one or more datafile copies to back up. The files can be specified either by filename or by tag. If specified by tag, and multiple datafile copies with this tag exist, then only the most current datafile copy of any particular datafile is backed up.
archivelog
This specifies a filename pattern, and/or a time-range or log sequence range used to choose which archivelogs to include in a backup. All archivelogs that meet the specification are included in the backup. If the range is specified by time, then the logs that were current at the begin and end times are included in the backup.
current control file
This specifies that the current control file is backed up. backup controlfile
This specifies the filename of a backup control file to back up. backupset
This specifies the primary key of a backup set to back up. The backup set must be on disk.
Backup Operand List
This is a list of operands specifying attributes for the backup sets and backup pieces that are to be created for this backup_specification.
tag
If specified, the backup sets are given the specified tag. The tag value is
null otherwise. parms
This is a quoted string containing OS-specific information. The string is passed to the OSD layer each time a backup piece is created.
Backing Up Files
format
This specifies the file name to use for the backup pieces. The name must be enclosed in quotation marks. Any name that is legal as a sequential filename on the platform is allowed, provided that each backup piece gets a unique name. If backing up to disk, then any legal disk filename is allowed, provided it is unique.
The format operand may be specified in any of these places: - the backup_specification
- the backup command
- the allocate channel command
If specified in more than one of these places, Recovery Manager will search for the format operand in the order shown above.
The following substitution variables are available in format strings to aid in generating unique filenames:
%p
The backup piece number within the backup set. This value starts at 1 for each backup set and is incremented by 1 as each backup piece is cre- ated.
%s
The backup set number. This is a counter in the control file that is incre- mented for each backup set. The counter value starts at 1 and is unique for the lifetime of the control file. If a backup control file is restored, then duplicate values may result. Also, CREATE CONTROLFILE ini- tializes the counter back to 1.
%d
The database name. %n
The padded database name. %t
The backup set stamp. This is a 4-byte value derived as the number of seconds since a fixed reference date/time. The combination of %s and %t can be used to form a unique name for the backup set.
%u
An 8-character name composed of compressed representations of the backup set number and the time the backup set was created.
include current control file
This operand creates a snapshot of the current control file and places it into each backup set produced by this backup_specification.
filesperset
This specifies the maximum number of datafiles to place in one backup set. If the number of datafiles specified or implied by the backup speci- fication is greater than filesperset, then the backup specification creates multiple backup sets.
channel
The name of a channel to use when creating the backup sets for this
backup_specification. If this operand is not specified, then Recovery Man-
ager dynamically assigns the backup sets for this backup_specification to any available channels during job execution.
delete input
This operand causes the input files to be deleted upon successful cre- ation of the backup set. May be specified only when backing up archived logs or datafile copies. It is equivalent to issuing a
change...delete command for all of the input files.
Backing Up: Scenario
Let’s assume there is a database called FOO that a database administrator wants to backup. The administrator has 3 tape drives available for the backup, and the database has 26 datafiles in it. The administrator wants to multiplex the backup, placing 4 files into each backup set, so chooses the number 4 because it is sufficient to keep the tape drive streaming. The administrator is not concerned about how datafiles are grouped into backup sets.
The administrator issues the following commands:
create script foo_full {
allocate channel t1 type ‘SBT_TAPE’; allocate channel t2 type ‘SBT_TAPE’; allocate channel t3 type ‘SBT_TAPE’; backup full filesperset 4
database format ‘FOO.FULL.%n.%s.%p’); run {