15. From one machine , server database backup that is restore in another machines server. - sayanbhattacharya1234/Oracle_DBA GitHub Wiki

.

For this task we need two machines and two servers databases .

start two machines and connect the network for both machine.

check the databases in both the servers by [ cat /etc/oratab ] . so there will be not the same database name in both servers.

.

Scenario 1 == backup of a #database from server a , and copy the backup of this #database to server b and there restore that #database

##.

1>

server a >

set the env of that database and RMAN> full backup of a database and check server a and server b are in same network.

server b >

open a terminal and check the databases have and check network connect with server b .

and make a directory here by [ mkdir -p /u01/backup ]

2>

server a>

now we secured copy the backup and paste another servers dir(backup/) by { scp /u01/app/oracle/fast_r_a/PROD/autobackup/2026_06_13/* [email protected]:/u01/backup/ } [ controlfiles and spfile ]

scp /u01/app/oracle/fast_r_a/PROD/backupset/2026_06_13/* [email protected]:/u01/backup/ [ for datafiles ] after that

on server b> check the backup files are all copied or not [ ls -l /u01/backup/ ]

. if lot of backups are there check the latest backup by ls -rtl

server b>

now vi /etc/oratab/ -> copy a line of database and paste ,edit the database name. save and exit. set the env of that database.

now we copy a databases password file for new database's password file by goto the passwd location [ cp orapwprod orapwtata ] . set env _> prod. and check it , set tata env.

now we dont have parameter files so need parameter files.

we login with RMAN [ RMAN have that power > RMAN can byforce start the database in nomount without parameter file by its own. but in sql it says there is no parameter file > error.

rman target /

RMAN> startup nomount; -> RMAN> restore spfile from '/u01/backup/ ol_mf_s... .bkp';

open a new tab goto that location of [ ls -rtl /u01/backup/ now for control file and spfile ol_mf_s ... .bkp copy this to restore spfile. done.

now goto sql> by sqlplus to shutdown database immediate .SQL> shu immediate then and start database nomount with spfile. SQL>

create pfile from spfile;

remember we have to create audit file (if pfile have if not then create pfile from spfile) location and control file location by mkdir .

so open a new tab ,vi to pfile > copy audit adump location > $ > mkdir -p /u01/app/oracle/admin/prod/adump

control files > mkdir /u01/app/oracle/oradata/PROD/ , mkdir /u01/app/oracle/fast_r_a/PROD ..

SQL> startup nomount; -> RMAN> restore controlfile from '/u01/backup/ol_mf_s .bkp'; [ ol_mf_s.bkp file from ls -rtl /u01/backup/ ]

RMAN> alter database mount;

##.

now we say restore,recover the database > control restored means it has got his own location /u01/app/oracle/fast.... . but here backup is in another location /u01/backup/. i have to make system understand , now the backup i have that will be stored in this location for that

RMAN > catalog start with '/u01/backup/';

yes

RMAN> restore database;

RMAN> alter database open resetlogs;

RMAN> recover database;

RMAN> alter database open resetlogs; , exit and check the database name , open mode.

##.

STEP 1 -what databases have in two servers

STEP 2 -check network btw two server

STEP 3 -backup of a database

STEP 4 -copy the tata backup files to another servers created location

STEP 5 -on server b -now create a new db name and create password file, set env and open RMAN first we restore spfile and create pfile.

STEP 6 - now in RMAN restore controlfile and mount the database and restore