0% found this document useful (0 votes)
20 views5 pages

Mypractice Primary

The document describes an RMAN backup operation. It includes details of backing up datafiles, archived logs, and control files. It then shows restoring a control file and listing the backups. The backup is copied to the secondary database for recovery purposes.

Uploaded by

Raihan Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views5 pages

Mypractice Primary

The document describes an RMAN backup operation. It includes details of backing up datafiles, archived logs, and control files. It then shows restoring a control file and listing the backups. The backup is copied to the secondary database for recovery purposes.

Uploaded by

Raihan Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

input datafile file number=00007

name=/u01/app/oracle/oradata/PROD/datafile/o1_mf_users_jwrookh2_.dbf
channel ORA_DISK_1: starting piece 1 at 2021-12-30:06:49:54
channel ORA_DISK_1: finished piece 1 at 2021-12-30:06:50:01
piece handle=/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/2021_12_30/
o1_mf_nnndf_TAG20211230T064954_jwt
0kltm_.bkp tag=TAG20211230T064954 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 2021-12-30:06:50:01

Starting backup at 2021-12-30:06:50:01


current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=5 RECID=4 STAMP=1092639001
channel ORA_DISK_1: starting piece 1 at 2021-12-30:06:50:02
channel ORA_DISK_1: finished piece 1 at 2021-12-30:06:50:03
piece handle=/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/2021_12_30/
o1_mf_annnn_TAG20211230T065002_jwt
0kt55_.bkp tag=TAG20211230T065002 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2021-12-30:06:50:03

Starting Control File and SPFILE Autobackup at 2021-12-30:06:50:03


piece handle=/u01/app/oracle/fast_recovery_area/prod/PROD/autobackup/2021_12_30/
o1_mf_s_1092639003_jwt0kvgr_.bkp
comment=NONE
Finished Control File and SPFILE Autobackup at 2021-12-30:06:50:04

RMAN>

RMAN>

RMAN>

RMAN> list backup of database summary;

List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- ------------------- ------- ------- ---------- ---
3 B F A DISK 2021-12-29:22:44:08 1 1 NO
TAG20211229T224402
7 B F A DISK 2021-12-30:06:50:00 1 1 NO
TAG20211230T064954

RMAN>

RMAN>

RMAN>

RMAN> exit

Recovery Manager complete.


[oracle@primary ~]$ ll
total 0
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Desktop
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Documents
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Downloads
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Music
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Pictures
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Public
drwxrwxr-x. 2 oracle oracle 23 Dec 29 22:46 rmanbkp
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Templates
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Videos
[oracle@primary ~]$ cd rmanbkp/
[oracle@primary rmanbkp]$ ll
total 10352
-rw-rw----. 1 oracle oracle 10600448 Dec 29 22:46 c-bkp.ctl
[oracle@primary rmanbkp]$ rm -rf *
[oracle@primary rmanbkp]$ ll
total 0
[oracle@primary rmanbkp]$ cd
[oracle@primary ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Thu Dec 30 06:51:27 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.

connected to target database: PROD (DBID=504433454)

RMAN> exit

Recovery Manager complete.


[oracle@primary ~]$ pwd
/home/oracle
[oracle@primary ~]$ rman target /]

Recovery Manager: Release 12.2.0.1.0 - Production on Thu Dec 30 06:51:58 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-10000: error parsing target database connect string "/]"
[oracle@primary ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Thu Dec 30 06:52:01 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.

connected to target database: PROD (DBID=504433454)

RMAN> restore controlfile to '/home/oracle/rmanbkp/control.ctl';

Starting restore at 2021-12-30:06:53:04


using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=67 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore


channel ORA_DISK_1: restoring control file
output file name=/home/oracle/rmanbkp/control.ctl
channel ORA_DISK_1: reading from backup piece
/u01/app/oracle/fast_recovery_area/prod/PROD/autobackup/2021_12_30/
o1_mf_s_1092639003_jwt0kvgr_.bkp
channel ORA_DISK_1: piece
handle=/u01/app/oracle/fast_recovery_area/prod/PROD/autobackup/2021_12_30/
o1_mf_s_10926
39003_jwt0kvgr_.bkp tag=TAG20211230T065003
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2021-12-30:06:53:07

RMAN>

RMAN>

RMAN> exit

Recovery Manager complete.


[oracle@primary ~]$ ll
total 0
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Desktop
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Documents
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Downloads
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Music
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Pictures
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Public
drwxrwxr-x. 2 oracle oracle 25 Dec 30 06:53 rmanbkp
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Templates
drwxr-xr-x. 2 oracle oracle 6 Dec 29 10:12 Videos
[oracle@primary ~]$ cd rmanbkp/
[oracle@primary rmanbkp]$ ll
total 10352
-rw-rw----. 1 oracle oracle 10600448 Dec 30 06:53 control.ctl
[oracle@primary rmanbkp]$ scp control.ctl
[email protected]:/u01/app/oracle/oradata/PROD/controlfile/o1_mf_jwr
opgyv_.ctl
[email protected]'s password:
scp: /u01/app/oracle/oradata/PROD/controlfile/o1_mf_jwropgyv_.ctl: No such file or
directory
[oracle@primary rmanbkp]$ scp control.ctl
[email protected]:/u01/app/oracle/oradata/PROD/controlfile/o1_mf_jwr
opgyv_.ctl
[email protected]'s password:
control.ctl 100%
10MB 31.4MB/s 00:00
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$ scp control.ctl
[email protected]:/u01/app/oracle/fastrecovery_area/prod/PROD/contro
lfile
[email protected]'s password:
control.ctl 100%
10MB 30.2MB/s 00:00
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$ scp control.ctl
[email protected]:/u01/app/oracle/fastrecovery_area/prod/PROD/contro
lfile/o1_mf_jwroph41_.ctl'
> ^C
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$ scp control.ctl
[email protected]:/u01/app/oracle/fastrecovery_area/prod/PROD/contro
lfile/o1_mf_jwroph41_.ctl
[email protected]'s password:
control.ctl 100%
10MB 29.5MB/s 00:00
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Thu Dec 30 07:01:19 2021

Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.

connected to target database: PROD (DBID=504433454)

RMAN> list backup tag TAG20211230T064954


2> ;

using target database control file instead of recovery catalog

List of Backup Sets


===================

BS Key Type LV Size Device Type Elapsed Time Completion Time


------- ---- -- ---------- ----------- ------------ -------------------
7 Full 1.00G DISK 00:00:06 2021-12-30:06:50:00
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20211230T064954
Piece Name:
/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/2021_12_30/
o1_mf_nnndf_TAG20211230T064
954_jwt0kltm_.bkp
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- ------------------- ----------- ------ ----
1 Full 1527634 2021-12-30:06:49:54 NO
/u01/app/oracle/oradata/PROD/datafile/o1_mf_syst
em_jwromy87_.dbf
3 Full 1527634 2021-12-30:06:49:54 NO
/u01/app/oracle/oradata/PROD/datafile/o1_mf_sysa
ux_jwroo1c0_.dbf
4 Full 1527634 2021-12-30:06:49:54 NO
/u01/app/oracle/oradata/PROD/datafile/o1_mf_undo
tbs1_jwroojf5_.dbf
7 Full 1527634 2021-12-30:06:49:54 NO
/u01/app/oracle/oradata/PROD/datafile/o1_mf_user
s_jwrookh2_.dbf

RMAN> list backup tag TAG20211230T064954;

List of Backup Sets


===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
7 Full 1.00G DISK 00:00:06 2021-12-30:06:50:00
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20211230T064954
Piece Name:
/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/2021_12_30/
o1_mf_nnndf_TAG20211230T064954_jwt0kltm_.bkp
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- ------------------- ----------- ------ ----
1 Full 1527634 2021-12-30:06:49:54 NO
/u01/app/oracle/oradata/PROD/datafile/o1_mf_system_jwromy87_.dbf
3 Full 1527634 2021-12-30:06:49:54 NO
/u01/app/oracle/oradata/PROD/datafile/o1_mf_sysaux_jwroo1c0_.dbf
4 Full 1527634 2021-12-30:06:49:54 NO
/u01/app/oracle/oradata/PROD/datafile/o1_mf_undotbs1_jwroojf5_.dbf
7 Full 1527634 2021-12-30:06:49:54 NO
/u01/app/oracle/oradata/PROD/datafile/o1_mf_users_jwrookh2_.dbf

RMAN>

RMAN>

RMAN>

RMAN>

RMAN> exit

Recovery Manager complete.


[oracle@primary rmanbkp]$ scp
/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/2021_12_30/
o1_mf_nnndf_TAG20211230T064954_jwt0kltm_.bkp
[email protected]:/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/
2021_12_30
[email protected]'s password:
o1_mf_nnndf_TAG20211230T064954_jwt0kltm_.bkp
100% 1026MB 32.2MB/s 00:31
[oracle@primary rmanbkp]$ scp
/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/2021_12_30/
o1_mf_annnn_TAG20211230T065002_jwt
[email protected]:/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/
2021_12_30
[email protected]'s password:
/u01/app/oracle/fast_recovery_area/prod/PROD/backupset/2021_12_30/
o1_mf_annnn_TAG20211230T065002_jwt: No such file or directory
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$
[oracle@primary rmanbkp]$

You might also like