HP-UX - Best way to copy directories with big files

HP-UX、Linux、Tru64 UNIX、NonStop、OpenVMS、Windows Server等,数据中心、虚拟化方案等

版主: xyevolve

版面规则
1. 本版是定位于惠普软件系统及解决方案的技术讨论区。
2. 本版鼓励发帖共同讨论技术问题,不鼓励站内信件私下交流,独知知不如众知知。
3. 本版允许转贴或引用他人的作品,但必须声明原作者信息。
4. 本版禁止发表出售、求购、或其他非技术讨论等帖子。
5. 本版禁止灌水,包括但不限于任何与所讨论主题无关的回复,无意义字符,直接复制其他回复等。
6. 本站附件禁止用于商业目的,请在下载后24小时内删除,本站不对其造成的结果负任何责任。
回复
头像
MUDBOY
创始人
帖子: 3877
注册时间: 2010年 12月 28日 21:17 星期二

HP-UX - Best way to copy directories with big files

帖子 MUDBOY » 2014年 10月 11日 10:06 星期六

Ideally the following command worked for me with reasonable performance, regardless of file size:

# cd /source; fbackup -f - -i . | (cd /destination; frecover -rXf -)

It is also the recommanded method for data copy introduced in the LVM management training.
Commands: Moving Data between Volume Groups

1. Determine the size of the LV to move, and create a new LV in the new VG

# lvdisplay /dev/vg01/data
# lvcreate –L 24 –n data vg02

2. Create a file system in the new LV

# newfs –F vxfs /dev/vg02/rdata

3. Create a temporary mount point for the new LV and mount it

# mkdir /tmp/data
# mount /dev/vg02/data /tmp/data

4. Copy the data to the new logical volume

# cd /data; fbackup –f - -i . | (cd /tmp/data; frecover –f - -r)
# umount /tmp/data

5. Unmount and remove the original LV

# umount /data
# lvremove -f /dev/vg01/data

6. Update /etc/fstab

# vi /etc/fstab

# mount -a

提倡分享之精神, 技术问题请在相关版面直接发帖, 站内短信恕不答复.
I don't answer private messages on topics of public interest, because it defeats the whole purpose of a message board.

回复