需要搭建一个测试环境,从生产环境中倒了数据泵的dump文件,由于比较大,gzip压缩了下,压缩到了2.4G的样子,在自己的windows机器下用crt rz上传到服务器上
[oracle@hollycrm ~]$ rz
rz waiting to receive.
开始 zmodem 传输。  按 Ctrl+C 取消。
  100% -1734964830 bytes -2393054 bytes/s 00:12:05       0 Errorsrrors

[root@hollycrm oracle]# ls -l /home/oracle/0214taiaer_stat.dmp.gz
-rw-r--r--. 1 oracle oinstall 2147483647 Feb 14 16:32 /home/oracle/0214taiaer_stat.dmp.gz


[root@hollycrm ~]# rpm -qa|grep rzsz
[root@hollycrm ~]# rpm -lq lrzsz-0.12.20-27.1.el6.i686

[root@hollycrm oracle]# man rz|less
RZ(1)                                                                    RZ(1)

       rx, rb, rz - XMODEM, YMODEM, ZMODEM (Batch) file receive

       rz [- +8abeOpqRtTuUvy]
       rb [- +abqRtuUvy]
       rx [- abceqRtuUv] file
       Rz  (Receive  ZMODEM)  receives  files  with the ZMODEM batch protocol.
       Pathnames are supplied by the sending program, and directories are made
       if  necessary  (and possible).  Normally, the "rz" command is automati-
       cally issued by the calling ZMODEM program, but some  defective  ZMODEM
       implementations may require starting rz the old fashioned way.

       The meanings of the available options are:

       -+, --append
              append received data to an existing file (ZMODEM, ASCII only).
       -a, --ascii
              Convert  files to Unix conventions by stripping carriage returns
              and all characters beginning with the first Control Z (CP/M  end
              of file).
       -b, --binary
              Binary (tell it like it is) file transfer override.
       -B NUMBER, --bufsize NUMBER
              Buffer  NUMBER  bytes before writing to disk. Default ist 32768,
              which should be enough for most situations. If you have  a  slow
              machine  or  a  bad disk interface or suffer from other hardware
              problems you might want to increase the buffersize.  -1 or  auto
              use  a  buffer large enough to buffer the whole file. Be careful
              with this options - things normally get worse,  not  better,  if
              the machine starts to swap.
       -e, --escape
              Force  sender  to  escape  all control characters; normally XON,
              XOFF, DLE, CR-@-CR, and Ctrl-X are escaped.
-p, --protect
              (ZMODEM) Protect: skip file if destination file exists.

-B number这个是指定传输过程中的的缓存,默认的32768已经足够,但是如果是disk IO压力较大,而内存又比较充足,可以适当的添加这个参数,但是主要如果大量使用swap,增加这个buffer无疑会给系统带来更糟糕的影响

Rz默认是-b –p参数,找了半天没有看见man的sz中有2GB的限制,最后只能选择ftp方式上传,想起小鱼第一年做dba时,也是碰到了一个u盘去拷贝dump文件,当时那个文件也大于2GB,从服务器传输到u盘感觉没什么问题,但是u盘到另一个服务器就总是出现这个dump文件无法识别,最后发现fat32有2Gb的限制,最大只支持单个文件2GB的限制,想想也很有意思的!

About xiaoyu

xiaoyu,享受数据库带给xiaoyu的乐趣! 欢迎邮件联系讨论
This entry was posted in linux、unix、windows. Bookmark the permalink.