copying data to raw devices using 'dd'

Tags
advanced

 
Thread Tools Search this Thread
# 1  
Old 03-22-2006
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.
# 2  
Old 03-22-2006
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.
# 3  
Old 03-23-2006
"dd" will not work with cross file-systems. You must use NFS or tar/gzip/ftp to accomplish task
# 4  
Old 03-23-2006
If you can NFS mount the destination system the following should work very well for you.
Code:
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
# 5  
Old 03-23-2006
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.

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
SQL: copying data up figaro Programming 3 2 Weeks Ago 04:38 PM
Raw Devices karthik9358 Red Hat 9 01-09-2014 04:23 PM
Copying data from one file server to another br1an Solaris 2 05-21-2013 08:36 PM
Copying data from files to directories newbie2010 Shell Programming and Scripting 2 05-17-2013 01:06 PM
Scrape 10 million pages and save the raw html data in mysql database Viruthagiri Shell Programming and Scripting 4 05-05-2013 06:51 AM
SQL: copying data down figaro Programming 8 12-08-2011 02:35 PM
How to make a CSV file from a Raw data Aditya.Gurgaon UNIX for Dummies Questions & Answers 4 12-06-2010 02:57 AM
Raw devices in C majid.merkava Programming 1 09-28-2010 01:07 PM
Put raw data to column data Nayanajith Shell Programming and Scripting 7 03-20-2007 05:13 AM
raw data to column data Nayanajith Shell Programming and Scripting 3 03-20-2007 03:10 AM
Error on HACMP5.3 volume group on raw devices after exporting vg cris1357 AIX 3 12-05-2006 04:04 AM
How to change Raw data to Coloumn data fields Nayanajith Shell Programming and Scripting 1 08-29-2006 02:23 AM
copying oracle tables from raw disk isenhart UNIX for Advanced & Expert Users 2 02-16-2004 06:25 PM