免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3117 | 回复: 4
打印 上一主题 下一主题

如何把数据从一个盘的分区复制导另一个盘的分区 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-26 19:51 |只看该作者 |倒序浏览
--------------------------------------------------------------------------------\r\n \r\n有个客户提出 他们们有台440 2快72G的盘 原来的/export/home是在0号盘上的  现在发现不够用 现在先把这个1号盘的整个空间个他用 下现在要把这个0号盘上该分区的内容导导 1号盘上 \r\n是不是在1号盘上建个文件系统 然后用tar把分区的内容导过去就可以了?\r\n或者还是要先ufsdump再ufsrestore?  \r\n\r\n\r\ntar把数据复制过去和用ufsdump ufsrestore复制文件系统后 里面的数据有什么不一样?\r\n\r\n用ufsdump备份的文件系统 再恢复导另外一个分区的时候 这2个分区要一样大小的吗?

论坛徽章:
0
2 [报告]
发表于 2006-12-26 21:56 |只看该作者
楼主错别字有点多。\r\n\r\n在1号盘上建个文件系统,用tar搞过去就能满足你的要求。\r\n\r\nufsdump/ufsrestore备份恢复的时候,两个分区可以不一样。\r\n\r\n至于tar过去和ufsdump/restore过去有啥区别,还真没有研究过。希望有高人能够解答一下。

论坛徽章:
0
3 [报告]
发表于 2006-12-26 22:32 |只看该作者
If I were you I would use ufsdump/ufsrestore instead of tar. ufsdump backs up everything on a UFS including inodes while tar may have issues with special files such as device file , sparse file etc. In a simple term, you can think of ufsdump as a \"lower\" level backup while tar is a \"higher\" level backup. Also ufsdump can perform incrumental backup of a file system while tar can not. However, caution should be taken to perform a clean ufsdump of a file system. Ideally you should:\r\n\r\n1. Un-mount the file system\r\n2. Do a fsck on it\r\n3. ufsdump it \r\n\r\nYou have other choices such as mirror the partition,dd etc. But I don\'t think it needs to be that complicated if you just want to move your file system around.

论坛徽章:
0
4 [报告]
发表于 2006-12-27 00:59 |只看该作者
# mount -F ufs /dev/dsk/new_disk /mnt/new_point\r\n# ufsdump 0f - /dev/rdsk/old_disk |(cd /mnt/new_point; ufsrestore xf -)\r\n\r\nufsdump/restore

论坛徽章:
0
5 [报告]
发表于 2006-12-27 00:59 |只看该作者
ufsdump/restore要比tar快
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP