copying data to raw devices using 'dd'

Hello all,

I'm new here, so this information may exist elsewhere on this forum. If so, please point me in the right direction.

Here's the problem.

I'm trying to migrate Oracle data from an HP system to a Sun system using a raw device as a 'bridge' between the two systems. Both machines can see the disk and I've gone as far as to perform a 'pvcreate' on the HP side and a 'label' on the Sun side. The copy works using the following syntax:

dd if=<file on HP side> of=<HP link to raw device that can be seen by both systems> oseek=10 bs=1024 conv=sync count=400000

The problem is that the file being copied is roughly 370000 blocks in size so there's a 'buffer' of 30000 blocks attached to the end of the copied file. I've instructed my DBA to specify a count size similar in size to the file, but they have multiple files to copy and they're looking for a 'wildcard' so to speak that they can use for the count size so they can script the copy process.

Any ideas from anyone on how to proceed? Maybe even a different syntax? My DBA is limiting the options available by not wanting to use tar or a tape backup/restore. Hopefully I'm making sense here.

Thanks.

The two os's are incompatible enough to make using the disk not a very easy route. Just copy the data across the network. Networks have standards, raw disk devices do not.

"dd" will not work with cross file-systems. You must use NFS or tar/gzip/ftp to accomplish task

If you can NFS mount the destination system the following should work very well for you.

example% cd fromdir; tar cf - . | (cd todir; tar xfBp -)

Change the fromdir and todir to fit. You may also have to play around with the xfBp args to tar depending on the system. As is, This will tar the entire directory preserving file dates, times, ownership and permissions, and put the files in the todir arg.

MPH

Is there some reason you cannot use Oracle export/import? That is what it is meant for.

You are running a big risk -- complete data corruption -- attempting what you're doing.