How to backup 2 servers w/ 1 script
In this case, I've got one tape backup device and 2 linux (Redhat 3) database servers.
I want to backup both servers (9i/10g db's) using RMAN. I need to ensure that one backup is complete before the other kicks off.
Right now I've got them scheduled far enough apart, but I'd rather have one server's script start the other's backup.
I run RMAN from a server which backups up database in other 6 servers, I simply run
connect catalog blah
connect target db1
not sure what would be your problem doing this way?
All local databases are 9i, remote server/databases are 10g. Can't backup a 10g database with 9i rman nor can you use a 9i catalog for 10g.
So I was thinking I'd just run it remotely in the same cron job / script.
Ken this would be one suggestion.
1. have the catalog created on 10G
2. have oracle 9i installed on the 10G server
3. Enable the remote login to the 9i servers to authenticate with the password file, and enable the remote_login option on the databases.
4. Write a shell script that would set the oracle environment accrodingly to the database it is backing up.
5. Create a scheduler script to where you call the backup script with the database names in the order you want them to be backed up. Remember not to put them in the background
6. In your crontab call this scheduler script and put it in the background.
So what will happen is that when the cron job executes the schedulter script, it is forced to execute and finish the first job before it stats the next. This would help you to achieve the order you would want.
On the other hand if you would like to have the setup on the local server 9i side, have the 10G installed on the local server side, start the listener under 10G on the local server and configure all your remote dbs to be remote accessible with the sysdba privs. Then schdule the jobs from the local server crontab to do the backups.
Hope this would help you.
Life is a journey, not a destination!
What I do is use ssh and execute remote commands, just generate a pair of public and private keys....
Sam and Pando,
Thanks for these excellent solutions. I'm heading down the remote ssh path .. it's going well so far.
Click Here to Expand Forum to Full Width