热门关键字:  ubuntu  分区  Fedora  linux系统进程  函数

当前位置 :| 主页>Linux教程>Linux命令>

dd - backup the whole harddisk

来源: 作者: 时间:2008-06-15 Tag: 点击:
A complete listing of all keywords is available from GNU dd with

# dd --help

For more options check dd man page

Using dd you can create backups of an entire harddisk or just a parts of it. This is also usefull to quickly copy installations to similar machines. It will only work on disks that are exactly the same in disk geometry, meaning they have to the same model from the same brand.

full hard disk copy

dd if=/dev/hdx of=/dev/hdy
dd if=/dev/hdx of=/path/to/image
dd if=/dev/hdx | gzip > /path/to/image.gz

Hdx could be hda, hdb etc. In the second example gzip is used to compress the image if it is really just a backup.

Restore Backup of hard disk copy

dd if=/path/to/image of=/dev/hdx

gzip -dc /path/to/image.gz | dd of=/dev/hdx

MBR backup

In order to backup only the first few bytes containing the MBR and the partition table you can use dd as well.

dd if=/dev/hdx of=/path/to/image count=1 bs=512

MBR restore

dd if=/path/to/image of=/dev/hdx

Add "count=1 bs=446" to exclude the partition table from being written to disk. You can manually restore the table.



相关文章:
unix与linux中的inode
高级 Linux 命令精通指南
Linux命令集合
Linux补丁工具 diff + patch
section.1 start
tar命令详解
Linux - chattr & lsattr
ln 命令的使用
Linux关机命令学习
Linux - chown 中的 -R 参数
linux - umask
linux初级使用命令
sed 命令
cp 命令
Linux必学的60个命令(1)-安装与登陆
Linux必学的60个命令(2)-文件处理
APT-CDROM
[Unix通用命令]与用户相关的命令
[Unixt通用命令]定位命令
dircolors
declare
rmmod
passwd
linux的kill命令与信号控制
怎么样把man手册的内容保存到某个文件里面?
linux 逐级显示文件命令--tree
Linux grep命令的使用
7个极具危险性的Linux命令
tr命令使用方法
apt-move 制作本地源