Linux Certification, System Administration, Programming, Networking Books
Question-Dump and Restore Commands

Can I apply dump and restore commands as follow to clone a partition from Drive-A to Drive-B, connected as slave

Drive-A is the system drive
Drive-B is a brand drive, partitioned but without formatted

# dump –f - /var | (cd /mnt/var; restore –rf -)

/var is the 'var' partition of Drive-A
/mnt/var is the mount point of an empty partition of Drive-B

Kindly advise whether the above syntax is correct

-------------------------------------------------------------------
You need to make a filesystem on the new drive and mount it first, but your command looks fine to me. Your pipe will survive changing directories and behave as expected.

I would use (and have a few times) "cp -a" or "tar cpf", but that's mostly because the filesystems I use don't have dump/restore.
Dump's only advantage seems to be support for incremental backups, but I can do that with rsync, which I need anyway for Gentoo.

-------------------------------------------------------------------
Tks for your advice.

I'll create filesystem and mount all partitions excluding 'swap' first.

I'll also consider following command line

cp -a -x /boot /mnt/boot
etc.

OR
find -print | cpio -pdmv /mnt/
for all partitions simultaneiously.

Hoping that there will be no syntax error

Quick Links:
Do you have a Linux Question?

Linux Home: Linux System Administration Hints and Tips