0% found this document useful (0 votes)
376 views1 page

Linux Shell Script To Backup Oracle Database Using RMAN

This document describes shell scripts to backup an Oracle database using RMAN. A first shell script, backup_script.sh, contains the RMAN commands to crosscheck backups, delete expired backups, allocate a channel, backup the database and archived logs. A second shell script, rman_exc.sh, starts an RMAN session and runs the first script to execute the backup. Running rman_exc.sh tests that the backup process works as intended.

Uploaded by

Frank Melendez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
376 views1 page

Linux Shell Script To Backup Oracle Database Using RMAN

This document describes shell scripts to backup an Oracle database using RMAN. A first shell script, backup_script.sh, contains the RMAN commands to crosscheck backups, delete expired backups, allocate a channel, backup the database and archived logs. A second shell script, rman_exc.sh, starts an RMAN session and runs the first script to execute the backup. Running rman_exc.sh tests that the backup process works as intended.

Uploaded by

Frank Melendez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Linux Shell Script to Backup Oracle database using RMAN First of all, I have created a shell script named

backup_script.sh which contains the actual sequence of commands to backup the database. [oracle@testmn ~]$ cat backup_script.sh run { crosscheck backup; delete expired backup; delete obsolete; allocate channel ch1 type disk; backup database format '/backups/hot_backups/daily_bk_%d_%T_%U'; backup archivelog all format '/backups/hot_backups/archivelog_%d_%u_%s_%T' not backed up 2 times; delete noprompt archivelog all backed up 5 times to disk completed before 'sysdate-7'; release channel ch1; } [oracle@testmn ~]$ Now, I have created another shell script named rman_exe.sh which will start the RMAN session and call the above shell script as the above created shell script. [oracle@testmn ~]$ cat rman_exc.sh #!/bin/bash rman target/ @/home/oracle/backup_script.sh [oracle@testmn ~]$ Now, run this script checking whether it's working: [oracle@testmn ~]$ sh rman_exc.sh

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy