Dump and Restore

I want to copy over the contents of one partition on hard drive A to another partition on hard drive B. Using DD command caused problems since it overwrote the partition information on hard drive B and made hard drive B's partition size the same as the one on partition A.

Our department manager thinks that using dump piped to restore should do the trick.
I am trying to work out the syntax:

dump /dev/sda1| restore /dev/sdb1

Wil dump/restore work in the way we want it to?

If we agree what you call partition is what we unix guys call filesystem, then copying the content of one filesytem to another is quite an easy task two options: using tar, or using cpio:
I prefer for this cpio
go to mount point of the first filesystem,
then:

find . -xdev| cpio -pdumlvx /<destination mountpoint>
or
find . -print | cpio -pduml /dest-directory

Please state your Operating System and version. This is going to be O/S specific.
Do you want to copy a Bootable System Partition or a Data Partition?
Can both partitions be mounted (i.e. they are not raw filesystems)?
What is the filesystem type (e.g. VXFS, UFS)?

The general solution for mounted Data Partitions is to use "cpio -p". The switches for cpio vary from O/S to O/S. Some need a large block size (say 64kb) for speed - some don't. The switch for not traversing filesystem boundaries varies too (some are "-mount", some are "-xdev").

For example.
Where /source_mountpoint is a quiescent mounted filesystem.
Where /destination_mountpoint is an empty filesystem.

cd /source_mountpoint
find . -xdev -print | cpio -pdumv /destination_mountpoint

I just tested for you the use of tar for this purpose (it works (on hpux...))

tar -cvf - testdir |$(cd /ant/vbe/tartest; tar -xvf -)

To answer your initial question, dump/restore is used for filesystems as a whole, it may not be your intention, the idea is to have a filesystem backup not a directory content copy...Your question answered?

I would be using Knopix 5.x

---------- Post updated at 12:35 PM ---------- Previous update was at 12:33 PM ----------

So if we use dump/restore would be have the problem we originally encountered when the dd command made the new hard drive 143 GB partition into a 63GB partition?

I don't have Knopix. My recollection of dump/restore is that they work on mounted filesystems not raw partitions. Yours may be different.

There is an example of chaining dump and restore in my O/S "man restore" . Not tested and may not apply to your O/S.

It states:

Thus, dump and restore can be used in a pipeline to dump and restore a file system with the command

dump 0f - /usr | (cd /mnt; restore xf -)