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 establish multiple backups at the same time in RMAN

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article introduces the knowledge of "how to set up multiple backups at the same time in RMAN". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Add the copies parameter to the RMAN command backup followed by the number of multiple backups

Examples are as follows:

Here we back up two identical backups to the following two directories at the same time.

/ db1_dbbk/RMAN/backup_%T_%s_%p_%c.lv0

/ db2_dbbk/RMAN/backup_%T_%s_%p_%c.lv0

Note that the parameter% c may appear if it is not added.

RMAN-20039: format requires% c when duplexing

In this error,% c represents the number of copies of the backup slice (numbered from 1). When multiple backups are generated, the copy number used to specify the backup slice is used with the copies parameter.

[experimental process]

Start RMAN without using the recovery directory

[oracle@db1 backup_sh] rman target /

Recovery Manager: Release 10.2.0.5.0-Production on Wed May 2 09:14:13 2012

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to target database: ORCL (DBID=1297821005)

Start backup

Here I specify the backup file to my D:\ oracle\ rmanbak, rmanbak2, rmanbak3 three folders, and use the replacement variable

% N: name used to specify tablespace% s: used to specify backup set number

FORMAT string substitution variable

Some replacement variables that are often used when using the FORMAT parameter:

% c: the number of copies of the backup slice (numbered from 1), which is used to specify the copy number of the backup slice when multiple backups are generated

% d: database name

% D: number of days in the month (DD)

% M: the month in the year (MM)

% N: name used to specify the tablespace

% f: used to specify absolute file number

% F: a unique name based on DBID, in the form of c-IIIIIIIIII-YYYYMMDD-QQ, where IIIIIIIIII is the DBID,YYYYMMDD of the database is the date, and QQ is a sequence of 1-256

% n: database name and will be populated with x characters on the right to keep its length 8

% u: is an 8-character name composed of backup set number and establishment time compression. Use% u to generate a unique name for each backup set

% p: represents the number of the backup segment in the backup set, starting with 1

% U: is the abbreviation for% u_%p_%c, which allows you to generate a unique name for each backup fragment (that is, disk file), which is the most commonly used naming method

% s: number of the backup set

% t: backup set timestamp

% T: format of year, month and day (YYYYMMDD); s

Note: if the FORMAT option is not specified in the BACKUP command, RMAN uses% U to name the backup fragment by default.

% e: used to specify the archive log serial number

Through the backup set number, we can see that the two backup files are identical in content.

RMAN > backup copies 2 incremental level=0 tag 'orcl1_0' SKIP INACCESSIBLE FILESPERSET 3 database

Include current controlfile format'/ db1_dbbk/RMAN/backup_%T_%s_%p_%c.lv0','/db2_dbbk/RMAN/backup_%T_%s_%p_%c.lv0'

Plus archivelog FILESPERSET 2 delete all input format'/ db1_dbbk/RMAN/backup_%T_%s_%p.arc','/db2_dbbk/RMAN/backup_%T_%s_%p.arc'

Using target database control file instead of recovery catalog

Allocated channel: ORA_DISK_1

Channel ORA_DISK_1: sid=112 instance=orcl1 devtype=DISK

Validation succeeded for archived log

. . .

Piece handle=/db1_dbbk/RMAN/backup_20120502_3011_1_1.lv2 comment=NONE

Piece handle=/db1_dbbk/RMAN/backup_20120502_3011_1_2.lv2 comment=NONE

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

Finished backup at 02-MAY-12

This is the end of how to create multiple backups at the same time in RMAN. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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