Linux restore命令:从dump备份中还原文件和文件系统。
Linux restore命令 功能描述
使用restore命令可以从dump备份中还原文件和文件系统。
Linux restore命令 语法
restore [选项] [文件]
命令中各选项的含义如表所示。
在restoe交互式操作时可以使用子命令,restore子命令如表所示。
Linux restore命令 示例
查看dump备份文件/root/boot0.dump中的包含内容
[root@rhel ~]# restore -tf /root/boot0.dump
Dump date: Mon Aug 19 01:02:332013
Dumped from: the epoch
Level 0 dump of /boot on rhel:/dev/sda1
Label: none
2 .
11 ./lost+found
1977 ./grub
22 ./grub/grub.conf
12 ./grub/splash.xpm.gz
23 ./grub/menu.lst
24 ./grub/device.map
25 ./grub/stage1
26 ./grub/stage2
27 ./grub/e2fs_stage1_5
28 ./grub/fat_stage1_5
29 ./grub/ffs_stage1_5
30 ./grub/iso9660_stage1_5
31 ./grub/jfs_stage1_5
32 ./grub/minix_stage1_5
33 ./grub/reiserfs_stage1_5
34 ./grub/ufs2_stage1_5
35 ./grub/vstafs_stage1_5
36 ./grub/xfs_stage1_5
1978 ./efi
18 ./efi/EFI
19 ./efi/EFI/redhat
20 ./efi/EFI/redhat/grub.efi
13 ./.vmlinuz-2.6.32-358.el6.x86_64.hmac
14 ./System.map-2.6.32-358.el6.x86_64
15 ./config-2.6.32-358.el6.x86_64
16 ./symvers-2.6.32-358.el6.x86_64.gz
17 ./vmlinuz-2.6.32-358.el6.x86_64
21 ./initramfs-2.6.32-358.el6.x86_64.img
通过/root/boot0.dump和/root/boot1.dump备份还原文件
[root@rhel ~]# restore -rf /root/boot0.dump
//先完成完全备份的还原
[root@rhel ~]# restore -rf /root/boot1.dump
//再完成增量备份的还原
以交互式方式从/root/boot0.dump备份还原文件
[root@rhel ~]# restore -if /root/boot0.dump
restore>ls //输入命令ls查看指定目录内容
.:
.vmlinuz-2.6.32-358.el6.x86_64.hmac initramfs-2.6.32-358.el6.x86_64.img
System.map-2.6.32-358.el6.x86_64 lost+found/
config-2.6.32-358.el6.x86_64 symvers-2.6.32-358.el6.x86_64.gz
efi/ vmlinuz-2.6.32-358.el6.x86_64
grub/
restore>add config-2.6.32-358.el6.x86_64
restore>quit //输入quit退出restore交互式界面
[root@rhel ~]#