免费注册 查看新帖 |

Chinaunix

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

如何用ufsdump,ufsrestore去备份和恢复? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2002-03-22 12:03 |只看该作者 |倒序浏览
[这个贴子最后由bear在 2002/03/27 10:57pm 编辑]

如何用ufsrestore去备份 根目录,var,usr目录
以及cot3d0sx 上的目录(我的系统安置自c0t0d0s1上)

论坛徽章:
0
2 [报告]
发表于 2002-03-22 12:26 |只看该作者

如何用ufsdump,ufsrestore去备份和恢复?

aswellas
是不是搞错了,你到底是想BACKUP还是RESTORE啊?
ufsdump是 backup,有联机修改的应该unmount文件系统再做,那你应该知道怎么做了吧
#ufsdump 0uf /dev/rmt/0 /var            ----(level 0 backup)
#ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s3

ufsrestore是 restore
恢复/ ,/var,/usr当然比较复杂,比如恢复/
#boot cdrom -s
#newfs /dev/rdsk/c0t0d0s0
#mount /dev/dsk/c0t0d0s0 /abc
#ufsrestore rf /dev/rmt/0
#cd /usr/platform/'uname -m'/lib/fs/ufs
#installboot bootblk /dev/rdsk/c0t0d0s0
#cd /
#unmount /abc
#init 6

呵呵!刚看过这部分内容,练习以下!

论坛徽章:
0
3 [报告]
发表于 2002-03-22 12:55 |只看该作者

如何用ufsdump,ufsrestore去备份和恢复?

好的多谢,好详细,我去试一下。
老师的力量是伟大的!

论坛徽章:
0
4 [报告]
发表于 2002-03-27 11:37 |只看该作者

如何用ufsdump,ufsrestore去备份和恢复?

To restore the / (root) file system, boot from the Solaris CD-ROM and then run ufsrestore.
Note – If / (root), /usr, or the /var file system is unusable because of some type of corruption or damage, the system will not boot.
The following procedure demonstrates how to restore the / (root) file system on the boot disk c0t0d0s0.
1. Insert the Solaris 8 Software CD 1 of 2, and boot the CD-ROM with the single-user mode option.
ok boot cdrom -s
2. Create the new file system structure.
# newfs /dev/rdsk/c0t0d0s0
3. Mount the file system to an empty mount point directory, /a and change to that directory.
# mount /dev/dsk/c0t0d0s0 /a
# cd /a
4. Restore the / (root) file system from its backup tape.
# ufsrestore rf /dev/rmt/0
Note – Remember to always restore a file system starting with the level 0 backup tape and continuing with the next lowest level tape up through the highest level tape.
5. Remove the restoresymtable file.
# rm restoresymtable
6. Install the bootblk in sectors 1–15 of the boot disk. Change to the directory containing the bootblk, and run the installboot command.
# cd /usr/platform/`uname -m`/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t0d0s0
7. Unmount the new file system.
# cd / ; umount /a
8. Use the fsck command to check the restored file system.
# fsck /dev/rdsk/c0t0d0s0
9. Reboot the system.
# init 6
10. Perform a full backup of the file system. For example:
# ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s0
Note – Always back up the newly created file system, as ufsrestore repositions the files and changes the inode allocation. Restoring the /usr and /var File Systems To restore the /usr and /var file systems repeat the steps described above, except step 6. This step is required only when restoring the (/) root file system.
Restoring Regular File Systems
To restore a regular file system, (for example, /export/home, or /opt) back to disk, repeat the steps described above, except steps 1, 6, and 9. Example
# newfs /dev/rdsk/c#t#d#s#
# mount /dev/dsk/c#t#d#s# /mnt
# cd /mnt
# ufsrestore rf /dev/rmt/#
# rm restoresymtable
# cd /
# umount /mnt
# fsck /dev/rdsk/c#t#d#s#
# ufsdump 0uf /dev/rmt/# /dev/rdsk/c#t#d#s#
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP