Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to back up the database with rman

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to use rman backup database", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use rman backup database" bar!

During the database mount or open phase, we can use backup database to back up the entire database.

You can also use the configure exclude command to exclude a tablespace from being backed up by default in the configuration, or you can specify that noexclude does not exclude a tablespace during backup.

To back up data:

1. Connect to the target library using RMAN

two。 Confirm that the database is in mount or open phase

3. Use the backup database command to back up the database. You should confirm the default values in configuration before backing up, and then add parameters according to the actual situation, such as channel,format,plus archivelog and so on.

Spfile and controlfile are backed up in the default value. For example, two channel backups are assigned to the full library.

[oracle@lzl ~] $vi / home/oracle/full_backup.sql

[oracle@lzl ~] $cat / home/oracle/full_backup.sql

Run {

Allocate channel c1 type disk

Allocate channel c2 type disk

Backup database format'/ home/oracle/rman_full_%T_%u'

Release channel c1

Release channel c2

}

RMAN > @ / home/oracle/full_backup.sql

RMAN > run {

2 > allocate channel C1 type disk

3 > allocate channel c2 type disk

4 > backup database format'/ home/oracle/rman_full_%T_%u'

5 > release channel C1

6 > release channel c2

7 >}

Released channel: ORA_DISK_1 . -release the channel in the default value

Allocated channel: c1

Channel c1: SID=1 device type=DISK

Allocated channel: c2

Channel c2: SID=43 device type=DISK . -each channel has its own sid

Starting backup at 2017-07-25 16:48:13

Channel c1: starting full datafile backup set

Channel C1: specifying datafile (s) in backup set

Input datafile file number=00001 name=/u01/app/oracle/oradata/test/system01.dbf

Input datafile file number=00004 name=/u01/app/oracle/oradata/test/users01.dbf

Channel C1: starting piece 1 at 2017-07-25 16:48:13

Channel c2: starting full datafile backup set

Channel c2: specifying datafile (s) in backup set

Input datafile file number=00002 name=/u01/app/oracle/oradata/test/sysaux01.dbf

Input datafile file number=00003 name=/u01/app/oracle/oradata/test/undotbs01.dbf

Channel c2: starting piece 1 at 2017-07-25 16:48:13. -two channel back up two data files respectively.

Channel C1: finished piece 1 at 2017-07-25 16:48:28

Piece handle=/home/oracle/rman_full_20170725_0asa8fad tag=TAG20170725T164813 comment=NONE

Channel c1: backup set complete, elapsed time: 00:00:15

Channel c1: starting full datafile backup set

Channel C1: specifying datafile (s) in backup set

Channel c2: finished piece 1 at 2017-07-25 16:48:28

Piece handle=/home/oracle/rman_full_20170725_0bsa8fad tag=TAG20170725T164813 comment=NONE

Channel c2: backup set complete, elapsed time: 00:00:15

Channel c2: starting full datafile backup set

Channel c2: specifying datafile (s) in backup set

Including current SPFILE in backup set .

Channel c2: starting piece 1 at 2017-07-25 16:48:28

Including current control file in backup set .

Channel C1: starting piece 1 at 2017-07-25 16:48:29

Channel c2: finished piece 1 at 2017-07-25 16:48:29

Piece handle=/home/oracle/rman_full_20170725_0dsa8fas tag=TAG20170725T164813 comment=NONE

Channel c2: backup set complete, elapsed time: 00:00:01

Channel C1: finished piece 1 at 2017-07-25 16:48:30

Piece handle=/home/oracle/rman_full_20170725_0csa8fas tag=TAG20170725T164813 comment=NONE

Channel c1: backup set complete, elapsed time: 00:00:01

Finished backup at 2017-07-25 16:48:30. -every backup piece is the same tag

Released channel: c1

Released channel: c2 . -release channel

RMAN > * * end-of-file**

[oracle@lzl ~] $ls-lrth rman_full_*

-rw-r- 1 oracle oinstall 490m Jul 25 16:48 rman_full_20170725_0bsa8fad

-rw-r- 1 oracle oinstall 998m Jul 25 16:48 rman_full_20170725_0asa8fad

-rw-r- 1 oracle oinstall 96K Jul 25 16:48 rman_full_20170725_0dsa8fas

-rw-r- 1 oracle oinstall 9.4m Jul 25 16:48 rman_full_20170725_0csa8fas

[oracle@lzl ~] $strings rman_full_20170725_0dsa8fas | more

} | {z

TEST

TAG20170725T164813

TEST

Test.__db_cache_size=729808896

Test.__java_pool_size=4194304

...

You can view the target library and tag in the first few lines of strings. If spfile can clearly see the parameter settings,

Thank you for your reading, the above is the content of "how to use rman backup database", after the study of this article, I believe you have a deeper understanding of how to use rman backup database, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report