Im working on a clustered database and I'm not knowing where to setup my rman script in order to schedule rman backups. Should i setup my scripts on both databases, or on only one. My aim is to backup the full databases and keep an rman script running on one of the nodes if there was any failure.
Asked
Active
Viewed 166 times
1 Answers
0
You only need to run the script against one node. You should keep copies of the script on all nodes, or on shared storage available to all nodes. Alternatively, you can run RMAN from a network client, too and not store the script on the DB nodes at all...

pmdba
- 6,457
- 2
- 6
- 16
-
So i should schedule the .sh file using crontab on any node or on a specific node? Im planning to run this scipt vi /u01/full_backup.sh export ORACLE_SID=proddb export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1 export DATE=$(date +%y-%m-%d_%H%M%S) rman target / log=/u01/rman/proddb_${DATE}.log << EOF run { crosscheck backup; delete noprompt obsolete; backup database; backup archivelog all delete input; } EOF – Elie W Sep 15 '22 at 13:47
-
Schedule it from just one node; it doesn't matter which one. Data storage is shared in ASM, so no need to run from multiple nodes under normal circumstances. Have the script *available* to run on other nodes in case the primary backup node is down for some reason. – pmdba Sep 15 '22 at 13:52
-
Exactly, my whole concern is regarding the script that will run on the other node in case the primary backup node is down. How will the other script automatically run in case of failure in the primary node? Or i should manually run it in case of failure? I'm afraid if i setup two cron tabs and will work together they will cause bad performance and waste of storage doing two backups. My aim is to run a script on the primary node and in case of failure, i want the other node to do the work. How can i do so automatically? – Elie W Sep 15 '22 at 14:07
-
If you want failover to be automatic, have the script check for the presence of a specific VIP on the node and only run RMAN if the VIP is present. The VIP will fail over automatically and execution of the script will follow it. Then you can use cron to schedule the job on all nodes and it will just exit if the VIP isn't found. – pmdba Sep 15 '22 at 15:08
-
I created an rman service and want my job scheduler to automatically run my service on the primary node and in case of failover, run it on the secondary node. The following article is somehow close to what I'm planning to do, however its not detailed and I'm seeking for support to apply it. https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=358110492937016&id=2365434.1&_afrWindowMode=0&_adf.ctrl-state=2ce7wz3c_852 – Elie W Sep 29 '22 at 08:27