I was trying to pass the backup location to the rman script dynamically as below. But it fails with syntax errors. Is there a way to pass the "/backup/folder/folder/" to the rman script? If I just pass string without "/" it works but with "/" it fails.
rman @${rmanbasepath}rman_replication_from_backups.rcv USING ${dbname} ${backupdir}
CONNECT AUXILIARY /
run {
allocate auxiliary channel a1 device type disk;
allocate auxiliary channel a2 device type disk;
allocate auxiliary channel a3 device type disk;
allocate auxiliary channel a4 device type disk;
DUPLICATE TARGET DATABASE TO &1
BACKUP LOCATION '&2'
NOFILENAMECHECK;
}
EXIT;
Found solution from https://community.oracle.com/thread/3514298 . solution is to use single quotes around the double quotes for the substitution parameter
like this:
$ rman @'config.cmd' using "'/rman_backup'"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With