rman backup

QuickSql
RMAN

BACKUP
Back up a database, tablespace, datafile, archived log, or backup set. RMAN puts the input files into one or more backup sets, which are RMAN-specific logical structures. The backup set is the smallest unit of a backup. RMAN only records backup sets in the repository that complete successfully. Each backup set contains at least one backup piece, which is a physical file containing the backed up data. A name mask for each backup piece can be specified by using a format_string.

Syntax:
BACKUP [FULL] [backupOperand] backupSpec [backupSpecOperand] [PLUS ARCHIVELOG [backupSpecOperand]]
Copies all blocks into the backup set, skipping datafile blocks never used. RMAN makes full backups by default if neither FULL nor INCREMENTAL is specified. Blocks are not skipped when backing up archived redo logs or control files. A full backup has no effect on subsequent incremental backups, so it is not considered a part of the incremental backup strategy.
BACKUP [INCREMENTAL LEVEL [=] integer] [backupOperand] backupSpec [backupSpecOperand] [PLUS ARCHIVELOG [backupSpecOperand]]
 
      backupSpec =
archivelogRecordSpecifier
Specifies a range of archived redo logs to be backed up.
BACKUPSET { ALL | completedTimeSpec }
BACKUPSET primary_key
CONTROLFILECOPY 'filename'
Specifies the filename of a control file copy. The control file copy can be:
♦ A copy of a normal control file (that is, not a standby control file) created with COPY CURRENT CONTROLFILE or ALTER DATABASE BACKUP CONTROLFILE TO 'filename' .
♦ A standby control file copy created with COPY STANDBY CONTROLFILE command or ALTER DATABASE CREATE STANDBY CONTROLFILE.
♦ The header of the control file determines whether it is a standby or nonstandby control file.
CURRENT CONTROLFILE [FOR STANDBY]
Specifies the current control file. FOR STANDBY generates a backup of the control file that is usable during creation of a standby database. The backup contains only the standby control file.
DATABASE
Creates a backup set containing all datafiles in the database. The backup only includes datafiles and control files; not archived redo logs.
If a backup includes datafile 1 and CONFIGURE CONTROLFILE AUTOBACKUP is OFF, then control file is automatically included in the backup set. If instance was started with a spfile, then it is included in the backup.
If a backup includes datafile 1 and if CONFIGURECONTROLFILE AUTOBACKUP is ON, then control file is not automatically included in the backup set. Instead, a separate autobackup control file piece is generated. If instance was started with a spfile, then it is included in the autobackup piece.
To force the current control file to be included in the backup set when CONFIGURECONTROLFILE AUTOBACKUP is ON use INCLUDE CURRENT CONTROLFILE.
DATAFILE datafileSpec
Specifies a list of one or more datafiles.
DATAFILECOPY 'filename'
Specifies the filenames of one or more datafile image copies.
DATAFILECOPY TAG [=] ['] tag_name [']
Specifies a list of one or more datafile copies, identified by tag. If multiple datafile copies with this tag exist, then only the most current datafile copy of any particular datafile.
TABLESPACE ['] tablespace_name [']
Specifies the names of one or more tablespaces. All datafiles currently part of the tablespace(s) are backed up.
SPFILE
Backs up spfile currently used by the database.

      backupOperand =
CHANNEL ['] channel_id [']
Specifies the case-sensitive name of a channel to use when creating backup sets.
CHECK LOGICAL
Tests data and index blocks that pass physical corruption checks for logical corruption.
COPIES [=] integer
Sets the number of identical backups (1 - 4) that should be created.
CUMULATIVE
Copies the data blocks used since the most recent backup at level n-1 or lower, where n si from 1 to 4. For example, in a cumulative level 2 backup RMAN backs up all blocks used since the most recent level 1 or level 0 backup.
DEVICE TYPE deviceSpecifier
Allocates automatic channels for the specified device type only. Only valid configured channels exist and have not manually allocated channels.
DISKRATIO [=] integer
Directs RMAN to populate each backup set with datafiles from at least integer disks.
FILESPERSET [=] integer
Specifies the maximum number of input files in each backup set. FILESPERSET is more useful for managing I/O distribution for backups of files on multiple disks.
FORCE
BACKUP OPTIMIZATION will be ignored causing all files to be backed up.
FORMAT [=] 'format_string'
Specifies a filename to use for the backup piece.
keepOption
Overrides any configured retention policy for this backup so that the backup is not considered obsolete. Use CHANGE to alter the keep status. Must be connected to a recovery catalog when specifing KEEP FOREVER.
MAXSETSIZE [=] integer [ K | M | G ]
Specifies a maximum size for a backup set. All backup sets are limited to this size.
NOCHECKSUM
Suppresses block checksums.
NOEXCLUDE
Backs up all tablespaces, including any for which a CONFIGURE EXCLUDE command has been entered. However, will not override SKIP OFFLINE or SKIP READONLY.
NOT BACKED UP [ SINCE TIME [=] 'date_string'] ]
Specifies the date after which files that have not been backed up, should be backed up.
NOT BACKED UP [ integer TIMES ]
Backs up only those archived logs that have not been backed up at least integer times.
PARMS [=] 'channel_parms'
Specifies a quoted string containing operating system-specific information.
POOL [=] integer
Specifies the media pool in which the backup should be stored.
PROXY [ONLY]
Backs up the specified files by means of the proxy copy functionality.
SKIP { OFFLINE | READONLY | INACCESSIBLE }
Excludes datafiles or archived redo logs from the backup set according to the criteria specified.
TAG [=] ['] tag_name [']
Creates a user-specified tag name for a backup set.
VALIDATE
Specified files are scanned and contents are verify. Generates no output. Use periodically to check for physical and logical errors in database files.

      backupSpecOperand =
CHANNEL ['] channel_id [']
Specifies the case-sensitive name of a channel to use when creating backup sets.
DELETE [ALL] INPUT
Deletes the input files upon successful creation of the backup set. Specify this option only when backing up archived logs, datafile copies, or backup sets. Is equivalent to issuing DELETE for the input files. The ALL option applies only to archived logs.
DISKRATIO [=] integer
Directs RMAN to populate each backup set with datafiles from at least integer disks.
FILESPERSET [=] integer
FORMAT [=] 'format_string'
Specifies a filename to use for the backup piece.
FORCE
BACKUP OPTIMIZATION will be ignored causing all files to be backed up.
INCLUDE CURRENT CONTROLFILE [FOR STANDBY]
Creates a snapshot of the current control file and places it into each backup set produced.
keepOption
Overrides any configured retention policy for this backup so that the backup is not considered obsolete. Use CHANGE to alter the keep status. Must be connected to a recovery catalog when specifing KEEP FOREVER.
MAXSETSIZE [=] integer [ K | M | G ]
NOEXCLUDE
Backs up all tablespaces, including any for which a CONFIGURE EXCLUDE command has been entered. However, will not override SKIP OFFLINE or SKIP READONLY.
NOT BACKED UP [ SINCE TIME [=] 'date_string'] ]
Specifies the date after which files that have not been backed up, should be backed up.
NOT BACKED UP [ integer TIMES ]
Backs up only those archived logs that have not been backed up at least integer times.
PARMS [=] 'channel_parms'
Specifies a quoted string containing operating system-specific information.
POOL [=] integer
Specifies the media pool in which the backup should be stored.
TAG [=] ['] tag_name [']
Creates a user-specified tag name for a backup set.
SKIP { OFFLINE | READONLY | INACCESSIBLE }
Excludes datafiles or archived redo logs from the backup set according to the criteria specified.

Related Commands:
CHANGE
CONFIGURE
CROSSCHECK
RECOVER
RESTORE
RUN
SET
SHOW

QuickSql:
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  
 
  
backup all archive logs created more than 5 and less than 10 days ago.
BACKUP ARCHIVELOG FROM TIME 'SYSDATE-10' UNTIL TIME 'SYSDATE-5';

backup all archive redo logs created between sequence numbers 9100 and 9111
BACKUP ARCHIVELOG FROM SEQUENCE 9100 UNTIL DEQUENCE 9111;

backup all archive redo logs created between SCN 596000 and 597148
BACKUP ARCHIVELOG FROM SCN 506000 UNTIL SCN 597148;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23898243/viewspace-694034/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23898243/viewspace-694034/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值