Operating System - HP-UX
1753257 Members
5715 Online
108792 Solutions
New Discussion юеВ

Re: moving allbase files via cpio?

 
SOLVED
Go to solution
Jim Turner
HPE Pro

moving allbase files via cpio?

Hi folks,

I would like to move allbase files from one LV to another without the pain and suffering of export/import. However, I know how diddling with sparse files can make a database app wax unhappy in a biblical sense.

I tried a test run with the following:
cd /old-dir
find . | cpio -o | (cd /new-dir; cpio -ivmud)

A dircmp between /old-dir and /new-dir was happy. File sizes for data and index files stayed the same. The data is no good, of course, because allbase was up and running -- this was just a dry run. The real deal would be done with allbase completely down.

Am I right in assuming that cpio preserves sparse files? If not, does anyone have a better suggestion for a wholesale move of allbase data from one LV to another (that avoids a full export and import)?

Thanks,
Jim
11 REPLIES 11
John Poff
Honored Contributor

Re: moving allbase files via cpio?

Jim,

I've never tried it before so I can't help much, but I'd suggest doing a 'du -sk *' in the two directories to see the number of blocks the files are using. My guess is that if the new files are sparse they will have the same number of blocks as the old ones.

JP
Jordan Bean
Honored Contributor
Solution

Re: moving allbase files via cpio?


Passthrough copy should work best.

cd /oldpath
find . -xdev | cpio -pdmux /newpath
Jordan Bean
Honored Contributor

Re: moving allbase files via cpio?

I didn't find any information about how cpio handles holey files. Anyone else?
Jordan Bean
Honored Contributor

Re: moving allbase files via cpio?

One more thing: I should point out that we copy Oracle table spaces without a problem this way.
Varghese Mathew
Trusted Contributor

Re: moving allbase files via cpio?

Hi,

Jordan is right. I had copied the entire oracle database filesystem successfully in the same way, long back. The command used was like this -->

#cd /oracleold
#find . -depth -print |cpio -pdmuxv /oraclenew

Assuming your original oracle files are in /oracleold and the new oracle destination is /oraclenew. The above command will give you the printout on the screen also.
Cheers !!!
Shahul
Esteemed Contributor

Re: moving allbase files via cpio?


Hi

U can use like this

#cd /oldpath
#find . -xdev -depth -print | cpio -pmdx /newpath

For more information see man page of find and cpio.

Best of luck
Shahul
Jim Turner
HPE Pro

Re: moving allbase files via cpio?

Thank you one and all!

I'm bolstered by the reports of successful Oracle tablespace relocation via cpio's passthrough functionality. I've used cpio for a decade, but never noticed the passthrough option. I should always remember to RTFM. I guess it's part of the same male genetic defect that inhibits guys from asking directions at the filling station when we're lost ;-)

I have every reason to believe that this will work. All the same, I will post a follow-up reply after the work is done to confirm success.

Warm Regards,
Jim
Bill Hassell
Honored Contributor

Re: moving allbase files via cpio?

 


Bill Hassell, sysadmin
Jim Turner
HPE Pro

Re: moving allbase files via cpio?

Dang, Bill, that's a lot of really excellent, detailed information! I greatly appreciate you taking the time to show the examples and clarify the differences.

Now, bottom line: Will our allbase database come up and work after the cpio puddle move (I love that, BTW)? I've received reports so far of successful Oracle and Allbase moves in the past using this method. Am I "missing the forest for the trees" with sparse files as related to allbase?