免费注册 查看新帖 |

Chinaunix

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

怎样做系统备份 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-07 22:32 |只看该作者 |倒序浏览
我想将系统做一次完全备份,用ufsdump做备份一定要在单用户模式下吗?一个文件系统一个文件系统的备份吗?刚学solaris,向各位高手请教

论坛徽章:
0
2 [报告]
发表于 2006-12-07 23:05 |只看该作者
ufsdump doesn't need to be done under single user mode even through it is recommended that way. If your system is quiet, you may perform an ufsdump at multi-user level. This is especially true if you have ufs logging turned on. However you need to do that at your own risk. Here is the reason why it is better to perform an unsdump at single user mode. In UFS (Unix file system), for each file or directory you create, the OS is going to allocate an inode for it. The inode keeps the property information of the file or directory such as permission, size, and ownership along with the pointers pointing to the data blocks that actually contain the data. When you do an ufsdump, it backs up the inodes first and then the data. So if you are ufsdumping on a busy file system, let's say the ufsdump just backed up all 100 inodes but haven't started backing up the 100 files yet, a user logged in and created another file. When the ufsdump program comes back to backup the files, there are now 101 files. That results on your tape 100 inodes but 101 files. When you restore it, you will get file system inconsistency. So the official way to perform a clean ufs backup is:

go to single user mode
perform an fsck on your file system
unmount the file system ( not necessary for / /usr or /var unless you want to boot from cdrom to do it)
perform an ufsdump on the file system
re-mount the file system
You need to do this for each file system
back to multi-user level

One hint is that when you perform ufsdump of multiple file systems to the same tape, make sure you don't overwrite each other

论坛徽章:
0
3 [报告]
发表于 2006-12-07 23:50 |只看该作者
"用ufsdump做备份一定要在单用户模式下吗?" --- No.
You can do it at run level 3 with snapshot.

Here is an example:
用<快照>功能自动备份 root 分区的脚本   
http://bbs.chinaunix.net/viewthread.php?tid=817959


"一个文件系统一个文件系统的备份吗?" --- Yes, if you use ufsdump.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP