$ rman target / nocatalog
Recovery Manager: Release 9.2.0.8.0 – 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: xxx (DBID=xxxxxxxxxx)
using target database controlfile instead of recovery catalog
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
RMAN>
# cat rmanBackup
run{
backup database;
crosscheck backup;
delete noprompt expired backup;
delete noprompt obsolete;
sql ‘alter database backup controlfile to trace’;
}
# cat rmanCall.sh
export ORACLE_BASE=/oracle/app
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_SID=xxx
/oracle/app/product/9.2.0/bin/rman target / nocatalog cmdfile=/backupdata/scripts/rmanBackup log=/backupdata/logs/rmanBackup.log append
ftp -v -n “ftp server” << cmd
user "root" "xxx"
cd /u03/rmanbackup/
type binary
prompt
mdelete *
lcd /backupdata/rman
mput *
quit
cmd
echo EOF > /backupdata/logs/ftp.log
#
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16530101/viewspace-713726/ ,如需转载,请注明出处,否则将追究法律责任。