DXfoto.com - Fotolia
Recovery Manager, or RMAN, is a tool from Oracle that can be used to back up and restore Oracle databases. The software runs on a management server and communicates with a target database or server over the network to manage the process of consistently backing up data.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
The RMAN command line can be accessed using the rman command, which presents a command prompt for the user to enter a series of backup or restore commands. Typically, the process of backing up a database consists of connecting to the database to be backed up, then specifying commands that detail the type of backup required.
RMAN commands can be scripted. The Oracle backup scripts are achieved by entering a series of RMAN commands into a text file and either quoting the file name at the rman prompt or using the text file as a parameter to the RMAN command proceeded by the @ symbol: rman @backupscript.cmd. Each of the commands is then executed in order.
Running commands like this is rather simplistic, especially when the database name or other variables are hardcoded into the scripting file. Hardcoding doesn't provide flexibility to use the same Oracle backup scripts for multiple purposes, like running against a set of databases.
An alternative option is to pass variables to the script file with the USING parameter. In this instance, each parameter passed is referenced within the command file as &1 - &n, where n is the number of parameters passed: rman @backupscript.cmd USING "db_prod".
Having the ability to pass parameters to Oracle backup scripts means a single script can support many database instances, which means it has a smaller management overhead. The syntax of RMAN scripts can be checked by running RMAN with the CHECKSYNTAX parameter. This allows the syntax of a file to be validated without actually executing the commands.
The best way to develop Oracle backup scripts is by exploring the command set on a test database. This can be used to validate the file syntax and test backup and restore workflows.
Once you've gained confidence using a test environment, the scripts can easily be ported to a production environment by having the target database as a variable that changes when the script is executed. Wrapping the whole process in a shell script provides for more flexibility in passing variables and in scheduling the scripts using tools like CRON.
Support levels vary for Oracle Recovery Manager backup
Oracle RMAN benefits include improved performance
Oracle availability tools can help solve downtime issues
Dig Deeper on Data storage backup tools
Related Q&A from Chris Evans
While ransomware remains a top threat, it is not the only cybersecurity problem data backup admins need to keep on their radar. Here are three more ...continue reading
A layered protection strategy works best against ransomware. Organizations must be diligent about backing up data, monitoring suspicious activity and...continue reading
The deduplication process reduces the amount of data in a storage system, but dedupe in the cloud may be more valuable to the cloud provider than the...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.