In the previous examples, we have some knowledge about it and tried some commands related to Oracle actual RMAN backup. However, in the actual operating environment, it is impossible to require DBAs to execute a command and a command to repeat the previous chapter. We are determined to optimize the work.
Therefore, we should write a script and put it on the serve
Tags: Rman incremental backup incremental CumulativeRman not only can make the database, data files and other full-scale backup, but also can do incremental backup. Incremental backups have two major advantages:
Reduce the time of database recovery.Database recovery uses archived logs to continually apply arch
Oracle 11g backup-based rman duplicate
Backup-based rman duplicate command to create standby databasePrerequisites: ensure the backup of the original database and archive is completely visible to the standby end,It is assumed that
1. Log On As an Oracle user. 2. Write an automatic backup script and clear the archived logs $ vihomeoraclebacks. sh #! Binshsourcehomeoracle. bash_profi
1. Log On As an Oracle user. 2. Write an automatic backup script and clear the archived logs $ vi/home/oracle/backs. sh #
Oracle Database Backup is encrypted. Encryption can protect Backup files and prevent backup data leakage.Oracle backup encryption mainly refers to RMAN encryption, and EXP/EXPDP encryption is not available.
to copy the backup set on the original library to the directory/u02/ftp/of the destination library (specific operation omitted)
4. Create the following directory on the new machine
Mkdir/u02/mydb
Mkdir-p/u02/mydb/oracl/{adump,bdump,cdump,dpdump,udump,pfile}
Mkdir-p/u02/mydb/oradata/oracl
Mkdir-p/u02/mydb/flash_recovery_area
5. Create a password file
Orapwd File=/u01/app/oracle/product/10.2.0/db_1/db
/rman_bak DB2 (Rw,no_root_squash)2. Node2 Configuration, Node 2 is mounted as an NFS client, and the two directories remain consistent.# manual Mount# mount-t NFS Db1:/data/rman_bak/data/rman_bak# Configure boot Auto mount# Cat/etc/fstabDb1:/data/rman_bak/data/rman_bak NFS Defaults 0 0Third, Oracle 11g RAC database parameter modification 1. To modify the save backup time for a control fileDescription: Defau
Concurrent execution of Oracle RMAN backup of a single file
If a file is a file of several gigabytes or tens of thousands of megabytes, You Need To parallelize the backup of the file. Generally, one channel can only read one file, however, you can use the multi-segment keyword to change this line:
Run {
Allocate cha
Today, we saw an RMAN backup script in the company's database: run {allocatechannelc1typediskmaxpiecesize2G; allocatechannel
Today, we saw an RMAN backup script in the company's database: run {allocate channel c1 type disk maxpiecesize = 2G; allocate channel
Today, we see this R
[Oracle Life Philosophy] RMAN Incremental Backup and life principles when practicing RMAN Incremental Backup, refer to ocp tk 042: apparently, based on the answer, archive log is not in the column, even if you hit the south wall, you also want to test [plain]
1, modify the Rman configuration, can recover to 7 days of any point in timeSu-oracleRman Target/Configure retention policy to recovery windows of 7 days;Show All;2. Create backup database and archive log Rman script Online_database_archivelog.rman#创建备份目录Mkdir-pv/backup/oraclebk/databaseMkdir-pv/
1. Backup;
1: connect to the target database:
RMAN> connect target sys/sysray @ dB or RMAN target = sys/sysray @ DB
2: query the configuration of the target database;
RMAN> show all;
Modify the configuration as follows:
Configure retention policy to redundancy 1; # defaultConfigure
Restore databases in different locations
Restore databases in different locations
Machine:
Select instance_name from v $ instance;
Select name from v $ database;
Select name from v $ datafile;
Log query mode:
Archive log list;
Shutdown immediate;
Startup mount;
Change the log archive mode:
Alter database archivelog;
Alter database open;
Alter system archive log current;
Select name from v $ archived_log;
Open Control file tracking:
Alter database backup
Machine A:
Select instance_name from V$instance;
Select name from V$database;
Select name from V$datafile;
Query log mode:
Archive log list;
Shutdown immediate;
startup Mount;
Change Log to archive mode:
ALTER DATABASE Archivelog;
ALTER DATABASE open;
Alter system archive log current;
Select name from V$archived_log;
To turn on control file tracking:
ALTER DATABASE backup Controlfile to trace;
To view the location of the trace file:
Show Parameter Use
Create a backup directory to view the remaining space [Email protected] ~]$DF-hDF: '/home/oratest/. Gvfs ': Permission deniedfilesystem Size used Avail use%mounted on/dev/mapper/centos-root 450G 27G 423G6% /Devtmpfs5.8G0 5.8G0% /Devtmpfs5.8G2.9G3.0G -%/dev/Shmtmpfs5.8G 34M5.8G1% /Runtmpfs5.8G0 5.8G0%/sys/fs/Cgroup/DEV/SDA1 497M 128M 370M -%/bootCreate the directory, and change the permissions for the database user sudo mkdir-p /rman_backup/bak_data
(I) First query the CPU and IO usage at the system level: top, iostat, sar...
(Ii) EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
(Iii) rman target/debug trace =/tmp/rmandebug.txt log =/tmp/rman_log20130727.txt
Execute backup
(Iv) EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();
(V) query v $ backup_datafile
Set markup html onSet echo onSet pages 80Set lines 180Set NUMFORMAT 99999999999999999Spool rman_
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.