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

Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.