超便利なddコマンドのメモ
◆MBRのバックアップ
[[email protected] ~]# dd if=/dev/xvda1 of=mbr.img bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 6.1e-05 seconds, 8.4 MB/s
※情報が間違っている場合もあるので、必ず確認や検証、他の情報も参考にしてください。
スポンサードリンク
◆ハードディスクを丸ごとバックアップ
◇準備
[[email protected] ~]# mount -t cifs -o username=share,iocharset=utf8 //192.168.0.6/share /mnt/nas
[[email protected] ~]# cd /mnt/nas #重要
◇バックアップ(圧縮)
[[email protected] nas]# dd if=/dev/xvda | gzip -c > /mnt/nas/xen2.img.gz
41943040+0 records in
41943040+0 records out
21474836480 bytes (21 GB) copied, 3006.29 seconds, 7.1 MB/s
◇バックアップ(圧縮+分割)
[[email protected] ~]# dd if=/dev/xvda | gzip -c | split -b 4000m > /mnt/nas/xen2.img.gz
oldId.20090701061426311