1.1. list backup summary; --Overview of available backups B means backup A means Archivelog, F means full backup, 0,1,2 means incremental level backup A means available AVALIABLE, X means EXPIRED list backup of database summary list backup of archivelog all summary list backup of tablespace users summary; list backup of datafile n,n,n summary list backup of datafile n, n, n summary These commands allow us to have an overall and intuitive understanding of the existing backup files. Configure the parallelism of the database device type. 4.3.7 Exclude options exclude configure exclude for tablespace 'users'; configrue exclude clear; This command is used to not back up the specified tablespace to the backup set. Skip offline, inaccessible or read-only files backup database skip readonly; backup database skip readonly; backup database skip offline; backup database skip inaccessible; 8. Backup set save strategy backup database keep until time='sysdate+30'; --Save backup 30 days, 5. 22.report obsolete; report the backup set that has been discarded (with a retention policy configured). 2.3.report unrecoverable; report unrecoverable report need backup days=3; 2.4. report need backup; report need backup incremental=3; report need backup days=3; -data report need backup redundancy=3; have not been backed up in the last three days (if there is a problem, these data files will need to be archived in the last three days Log can be restored) report need backup incremental=3;-How many incremental backup files are needed to restore the data files.

4.2.2 Backup optimization configure backup optimization on; configure backup optimization off; default value is off configure backup optimization clear;4.2.3 Default device default device type configure default device type to disk; configure default device type to disk; configure default device type to stb; configure default device type clear; default value is the hard disk tape setting Yes CONFIGURE DEFAULT DEVICE TYPE TO SBT; 4.3.4 Control file controlfile configure controlfile autobackup on; configure controlfile autobackup on; configure controlfile autobackup format for device type disk to '/cfs01/backup/conf/conf_%F'; configure controlfile autobackup clear; configrue controlfile autobackup format for device type disk clear; - is the storage path and file name of the snapshot file of the configuration control file. 1.2.list backup by file;-according to the file type are listed respectively: data file list, archive log list, control file list, SPFILE list 1.3.list backup; This command lists the detailed information of the existing backup set. This snapshot file is generated during the backup and is used to control the read consistency of the file. 4.3.8 Backup set size maxsetsize configure maxsetsize to 1G|1000M|1000000K|unlimited; configure maxsetsize clear; 4.3.9 Other options auxiliary CONFIGURE AUXNAME FOR DATAFILE 1 TO '/oracle/auxfiles/aux_1.f'; CONFIGURE AUXNAME FOR DATAFILE 2 TO '/oracle/auxfiles/aux_2.f'; CONFIGURE AUXNAME FOR DATAFILE 3 TO '/oracle/auxfiles/aux_3.f'; CONFIGURE AUXNAME FOR DATAFILE 4 TO '/oracle/auxfiles/aux_4.f'; - CONFIGURE AUXNAME FOR DATAFILE 1 CLEAR; CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR; CONFIGURE AUXNAME FOR DATAFILE 3 CLEAR; CONFIGURE AUXNAME FOR DATAFILE 4 CLEAR; Rman the format formats %copy number of the backup piece% c% d database name% D located on the days of the month (DD)% M located in the first few months (the MM)% based DBID a unique F. The name of this format is c-IIIIIIIIII-YYYYMMDD-QQ, where IIIIIIIIII is the DBID of the database, YYYYMMDD is thedate, and QQ is a sequence of 1-256%n database name, padded to the right to a maximum of eight characters% u An eight-character name represents the backup set and creation time%p The backup piece number in the backup set, starting from 1 to the number of files created%U A unique file name, representing %u_%p_%c%s backup set The number%t backup set timestamp%T year month day format (YYYYMMDD), Reference : https://blog.csdn.net/engledb/article/details/7675901. 4.1 Display current configuration information 1.1 RMAN> show all; backup database device type disk includ current controlfile; CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default, CONFIGURE BACKUP OPTIMIZATION OFF; # default, CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default, CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default, CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default, CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default, CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default, CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default, CONFIGURE MAXSETSIZE TO UNLIMITED; # default, CONFIGURE ENCRYPTION FOR DATABASE OFF; # default, CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default, CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default, CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:/ORACLE/PRODUCT/10.2.0/DB_1/DATABASE/S. Generally, the safest way is to use the second retention strategy. 4.3.5 Number of parallels ( number of channels ) device type disk|stb pallelism n; configure device type disk|stb parallelism 2; configure device type disk|stb clear; - Used to clear the above channel configurationconfigure channel device type disk format 'e/:rmanback_%U';configure channel device type disk maxpiecesize 100m configure channel device type disk rate 1200Kconfigure channel 1 device type disk format 'e/:rmanback_%U';configure channel 2 device type disk format 'e/:rmanback_%U';configure channel 1 device type disk maxpiecesize 100m. Rewrite the configure exclude command backup databas noexclude keep forever tag='test backup'; 6. This command is very useful for read-only tablespaces. is the storage path and file name of the snapshot file of the configuration control file.

configrue snapshot controlfile name to '/cfs01/backup/snapcf/scontrofile.snp'; configrue snapshot controlfile name clear;automatically back up the control file after backing up the file or executing the command to change the database structure . Configure channel device type disk maxpiecesize 100 m; Configure channel device type disk maxpiecesize 100 m; configure channel device type disk clear;4. 1. Set the backup set size ( all the results of a backup are a backup set, pay attention to the backup set size ) allocate channel c1 type disk maxpicecsize 100m format '/data/backup/full_0_%U_%T'; backup database tag='full_0'; release channel c1; 3. Backup control file4. configure commonly used commands summary memo. The default value is off . 4.3.6 Generate backup copies datafile|archivelog backup copies configure datafile backup copies for device type disk|stb to 3; configure archivelog backup copies for device type disk|stb to 3; - is to set the storage device type of the archive log of the database configure datafile|archivelog backup copies for device type disk|stb clear BACKUP DEVICE TYPE DISK DATABASE FORMAT '/disk1/backup/%U', '/disk2/backup/%U', '/disk3/backup/%U'; It is the number of copies of each backup of the configuration database.

Based on the above Backup data files during the second backup time backup database force; backup database not backed up; backup database not backed up; backup database not backed up since time='sysdate-2'; 10. Used to clear the above channel configuration, is to set the storage device type of the archive log of the database. List the databases currently backed up by RMAN : RMAN> list incarnation; summary query: - If there are many backup files, use these two list commands to have an overall understanding of the backup files.

Each Oracle backup can have multiple copies of exactly the same. Check logical errors during backup operation backup database not backed up since time='sysdate-2'; backup check logical database; 11. all the results of a backup are a backup set, pay attention to the backup set size, Skip offline, inaccessible or read-only files, Based on the above Backup data files during the second backup time, Check logical errors during backup operation, Display current configuration information.

Check for database errors backup databas noexclude keep forever tag='test backup'; backup validate database; 7. This command is used to not back up the specified tablespace to the backup set. This can avoid the control file and catalog loss, the control file can still be restored. Set the backup slice size ( tape or file system limit ) } You can also set the backup piece size in configure. This snapshot file is generated during the backup and is used to control the read consistency of the file. Its default value is 1 copy. Generate backup copies backup validate check logical database; backup database copies=2;12. Third and fourth: NONE can invalidate the backup retention strategy, and Clear will restore the default retention strategy. This command is very useful for read-only tablespaces. 1.2 Query non-default values in RMAN settings :NCFDBA.ORA'; # defaultselect name, value from v$rman_configuration ; 4.2. (If something goes wrong, these data files will need 3 incremental backups to restore) report need backup redundancy=3; --Report data files with redundancy times less than 3 report need backup recovery window of 2 days; --The system01.dbf data file is included in 3 or more backups, and users01.dbf is less than 3 times backup database tag='full_bak1'; - That is, the report is less than the number n of redundant database data file backup database maxsetsize=100m tag='datafile1'; - report the recovery takes 2 days for archive log data file three, backup common commands are summarized notes 1. set the backup flag RMAN-06183: datafile or datafile copy larger than MAXSETSIZE: file# 1/data/oradata/system01.dbf run { 2. report {device, need, obsolete, schema, unrecoverable}report schema;report obsolete;report unrecoverable;report need backup;report need backup; report need backup days=3; - report no in the last 3 days Backed up files report need backup recovery window of 2 days;report need backup recovery window of 2 days; 2.1.report schema; report database mode. Mandatory backup backup database ship readonly skip offline ship inaccessible; 9. used to determine the current recoverable status of the database and the information about the database that has been backed up. List commonly used commands summary Memo list command lists control files, backup information in the RMAN recovery catalog, is our most intuitive way to understand all visible database backup files list incarnation; list backup summary; list backup of database summary; list backup of tablespace summary; list backup of datafile n,n summary; list archivelog all summary; list backup by file; list backup; list expired backup; list copy; list backup of spfile; list backup of controlfile; list backup datafile n,n,n; list backup tablespace tablespace_name; list backup of archivelog all; list backup of archivelog from scn ; list backup of archivelog until scn ; list backup of archivelog from sequence ..; list backup of archivelog until time 'sysdate-10'; list backup of archivelog {all, from, high, like, logseq, low, scn, sequence, time, until}; 1. 1.4.list expired backup; List expired backup files 1.5.list copy; list copy of database; list copy of controlfile; list copy of tablespace users; list copy of datafile n,n,n; list copy of archivelog all; list copy of archivelog from scn 10000; list copy of archivelog until sequence 12; list backup of {archivelog, controlfile, database, datafile, spfile, tablespace}; 2. List related file information list backup of database; --full,incremental,tablespace,datafile list backup of spfile; 2.1 Server parameter file : list backup of controlfile; 2.2 Control file: list backup of datafle n,n,n,n; 2.3 Data file: list backup of datafle n,n,n,n; 2.4 Table space: list backup of archivelog {all, from, high, like, logseq, low, scn, sequence, time, until};2.5 archive log: list backup of archivelog all; list backup of archivelog until time 'sysdate-1'; list backup of archivelog from sequence 10; list backup of archivelog until sequence 10; list backup of archivelog from scn 10000; list backup of archivelog until scn 200000; list archivelog from scn 1000; list archivelog until scn 2000; list archivelog from sequence 10; list archivelog until sequence 12; list archivelog until sequence 12; two, reportSummary of common commands, The report is used to determine the current recoverable status of the database and the information about the database that has been backed up. Common configure options 4.2.1 retention policy (retention policy) SQL> configure retention policy to recovery window of 7 days; configure retention policy to redundancy 5; configure retention policy clear;first type ofCONFIGURE RETENTION POLICY TO NONE;The second type of redundancy is to maintain the latest 5 database backups that can be restored, and any backup that exceeds the latest 5 will be marked as redundancy. Generally, the safest way is to use the second retention strategy.
ページが見つかりませんでした – MuFOH

404

お探しのページは見つかりませんでした