rman target sys/xxx@xxx auxiliary sys/xxx@xxxADG <<EOF >>/home/oracle/xxx.log
run {
allocate channel ch001 type disk;
allocate channel ch002 type disk;
...
allocate auxiliary channel ch007 type disk;
allocate auxiliary channel ch008 type disk;
...
set newname for datafile 2518 to '+data';
...
set newname for datafile 2526 to '+data';
set newname for datafile 2527 to '+data';
backup as copy reuse
datafile 2518 auxiliary format "+DATA"
...
datafile 2526 auxiliary format "+DATA"
datafile 2527 auxiliary format "+DATA";
release channel ch001;
release channel ch002;
...
release channel ch012;
}
EOF