Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Monday, April 28, 2008

dd and rsync in Linux

The disk dump command, founded in Linuxquestions.org
and another info

Duplicating smaller partition, or drive to larger partition, or drive; or vice versa:
unmount before format the partition:
Code:
mkfs.ext3 /dev/sdXX
mkfs.ext3 /dev/hdZZ

Delete lost+found directory in the new partition and then mount it
mount -rw /dev/sdXX /mnt/sdXX

Example: You want to sync the root directory tree to another drive, but the other drive is larger.
If you use dd, you will get a file system that is smaller than the larger destination drive.
In this case you want to sync files, not the file system:
Format and mount the destination drive.
Code:
rsync -avH  /mnt/source_drive/* /mnt/destination_drive/
will sync all the files as files.
Rsync preserves the target file system.
If the second drive does not have the same structure of the logical drives, then don't forget to reedit the /boot/grub/menu.lst and the /etc/fstab in the /mnt/sdXX
You need to run:
Code:
grub-install
update-grub
from a the rescue menu of an installation CD/DVD for the target to become bootable.
If the target was bootable previously, it remains bootable.
-----------------------------------------------------------------------------------------------------------------------

How to Backup Entire Linode to another Disk Image

No comments: