0

Introduction: I have to set up a backup concept for an old Oracle 10g installation. The server is old and poorly managed, but I have to ensure we have rock solid backups until the system will be taken offline in early 2014. I've already read a few lines about exp and RMAN in the oracle documentation. Sadly the system lacks any oracle tools (no sqlplus => no command line, no exp & co) and I'd prefer not to install additional software right now.

Is there an easy way to set up a backup solution (exp / rman) from the client machine?

PS: While we don't have commandline on the system itself - we got the Oracle Managment console installed on a client. So client based backup solutions would be fine

2 Answers 2

2

The backup tools provided by Oracle can be used from the client side, but to do so, you need SYSDBA privileges. You can use the rman, expdp or exp commands from the client side. Using rman is recommended, since it is the only one which is capable of taking differential backups. To use rman, connect to the server using the

connect target sys@SERVERNAME

command, where "SERVERNAME" is the TNS entry for the server.

rman and expdp will make backups on the server, so for example if you allocate a disk channel in rman, it will try to write backup on the server, and if you allocate a tape device, the server must have access to the device.

0

I use the following script.

#!/usr/bin/ksh

####### env #######
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db
export PATH=$PATH:$ORACLE_HOME/bin
export TNS_ADMIN=/u01/app/oracle/product/10.2.0/asm/network/admin
export ORACLE_SID=WIND1
export NLS_LANG=american
export NLS_DATE_FORMAT='YYYY-MM-DD, HH24:MI:SS'

export BACKUP_LOC=/rman_backups/WIND1

####### log ######
export DATE=`date +"%Y%m%d%H%M%S"`
LOGFILE=$BACKUP_LOC"/log/rman_backup-"$DATE".log"

exec > $LOGFILE 2>&1

echo "Start of Prod CDA Full Backup " $DATE

####### rman backup database, archive, controlfile and spfile #######
$ORACLE_HOME/bin/rman << EOF

connect target sys/password1

CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;

run {
sql 'alter system checkpoint' ;

BACKUP DEVICE TYPE DISK database FORMAT '/rman_backups/WIND1/database/%T_datafile_s%s';

sql 'alter system archive log current' ;

BACKUP DEVICE TYPE DISK archivelog all FORMAT '/rman_backups/WIND1/database/%T_archive_s%s' filesperset 20;

BACKUP DEVICE TYPE DISK CURRENT CONTROLFILE FORMAT '/rman_backups/WIND1/database/%T_control_s%s';

BACKUP DEVICE TYPE DISK SPFILE FORMAT '/rman_backups/WIND1/database/%T_spfile_s%s';
}

CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;

DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
DELETE NOPROMPT OBSOLETE;

exit
EOF

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .