[20171101]rman to destination.txt
--//国庆放假,看了一些rman方面的书,看到一个不常用的参数to destination,测试看看.
1.环境:
SYS@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.测试:
RMAN> backup as copy datafile 6 to destination '/home/oracle/backup/';
Starting backup at 2017-11-01 09:01:58
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/mnt/ramdisk/book/tea01.dbf
output file name=/home/oracle/backup/BOOK/datafile/o1_mf_tea_dzl786k3_.dbf tag=TAG20171101T090158 RECID=61 STAMP=958899718
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 2017-11-01 09:01:59
Starting Control File and SPFILE Autobackup at 2017-11-01 09:01:59
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2017_11_01/o1_mf_s_958899719_dzl787nw_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2017-11-01 09:02:00
RMAN> backup datafile 6 to destination '/home/oracle/backup/';
Starting backup at 2017-11-01 09:02:25
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=/mnt/ramdisk/book/tea01.dbf
channel ORA_DISK_1: starting piece 1 at 2017-11-01 09:02:26
channel ORA_DISK_1: finished piece 1 at 2017-11-01 09:02:27
piece handle=/home/oracle/backup/BOOK/backupset/2017_11_01/o1_mf_nnndf_TAG20171101T090225_dzl7921x_.bkp tag=TAG20171101T090225 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2017-11-01 09:02:27
Starting Control File and SPFILE Autobackup at 2017-11-01 09:02:27
piece handle=/u01/app/oracle/fast_recovery_area/BOOK/autobackup/2017_11_01/o1_mf_s_958899747_dzl79354_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2017-11-01 09:02:28
$ tree /home/oracle/backup/BOOK/
/home/oracle/backup/BOOK/
|-- backupset
| `-- 2017_11_01
| `-- o1_mf_nnndf_TAG20171101T090225_dzl7921x_.bkp
`-- datafile
`-- o1_mf_tea_dzl786k3_.dbf
--//有点像将/home/oracle/backup当作闪回区目录,非常像将备份放在闪回区.