LVM and VxVM
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best command to copy from filesystem1 to filesystem2?

 
SOLVED
Go to solution
Highlighted
gigiz
Valued Contributor

What is the best command to copy from filesystem1 to filesystem2?

I Guys,

in a system hpux 11.11

i need to copy a contents of filesystem1 (lvm)  into filesystem2 (vxvm).

file system 1  is larger 130 Gb and there are many file larger of 12 Gb, and simbolik link.

I have think to copy by tar but it not support file larger than 8 Gb.

I have think to copy by cp but i'm not sure about a link permission .

What is the best command to copy  from filesystem1 to filesystem2?

Are there veritas commad like vxdump and vxrestore that work fine for my situation?

 

 

7 REPLIES 7
Robert_Jewell
Honored Contributor

Re: What is the best command to copy from filesystem1 to filesystem2?

A couple of quick methods:

Using cpio:

cd sourcedir
find . -print|cpio -pudlmv destdir

Using pax:

pax -rw sourcedir destdir

-Bob
----------------
Was this helpful? Like this post by giving me a thumbs up below!
Dennis Handly
Acclaimed Contributor

Re: What is the best command to copy from filesystem1 to filesystem2?

>What is the best command to copy  from filesystem1 to filesystem2?

 

You may want to copy the raw bits from one filesystem to another.

 

>Using cpio:

 

No good for 12 Gb files.

 

>Using pax:  pax -rw sourcedir destdir

 

For your large files, you need to add: -x pax

gigiz
Valued Contributor

Re: What is the best command to copy from filesystem1 to filesystem2?

I would use vxdump and vxrestore. What is the exact sintax command ? 

James R. Ferguson
Acclaimed Contributor

Re: What is the best command to copy from filesystem1 to filesystem2?

Hi:

 

Another alternative which handles largefiles is 'fbackup'/'frecover' thusly:

 

# cd srcdir && fbackup -i . -f - | ( cd dstdir && frecover -Xsrf - )

 

Regards!

 

...JRF...

Steven Schweda
Honored Contributor

Re: What is the best command to copy from filesystem1 to filesystem2?

> I have think to copy by tar but it not support file larger than 8 Gb.

 

   GNU "tar" has no such limit.

 

> I would use vxdump and vxrestore. What is the exact sintax command ?

 

      man vxdump

      man vxrestore

gigiz
Valued Contributor
Solution

Re: What is the best command to copy from filesystem1 to filesystem2?

This is the syntax of vxdump/restore command:

 

vxdump 0f - /srcfs|(cd /tgtfs;vxrestore rf -)

Its Ok and show the progress copy. Just one problem, for the symbolic lynk not  mantains the just owner and group.

 

 

Dennis Handly
Acclaimed Contributor

Re: What is the best command to copy from filesystem1 to filesystem2?

>for the symbolic link not maintains the just owner and group.

 

(Does not maintain?  Or only maintains?)

The owner & group for symlink aren't important.  If you do want to change them, you can use "chown -h".