Thursday 2 October 2014

RMAN Automatic Script : Image copy

rman <<EOF
connect target rman/rman_oracledba@test2
connect catalog rman/rman_oracledba@test1
run { allocate channel d1 type disk;
copy datafile '/data/oracle/TEST2/dataTEST2.dbf'
to '/data/oracle/BACKUP/dataTEST2.dbf';
copy datafile '/data/oracle/TEST2/rbsTEST2.dbf'
to '/data/oracle/BACKUP/rbsTEST2.dbf';
copy datafile '/data/oracle/TEST2/tempTEST2.dbf'
to '/data/oracle/BACKUP/tempTEST2.dbf';
copy datafile '/data/oracle/TEST2/systemTEST2.dbf'
to '/data/oracle/BACKUP/systemTEST2.dbf';
copy current controlfile to '/data/oracle/BACKUP/ctrlTEST201.ctl';
}
EOF

No comments:

Post a Comment