Operating System - HP-UX
1753894 Members
7460 Online
108809 Solutions
New Discussion юеВ

Re: What is the best command to copy file from one system to the other

 
Bill Hassell
Honored Contributor

Re: What is the best command to copy file from one system to the other

> fbackup no longer supported...

Actually it is more like "no longer recommended". And unfortunately, changes were made to fbackup for 11.31 that affect compatibility with all previous versions of fbackup. I think fbackup is being deprecated in order to push sales for Data Protector. The alternative utilities such as pax, tar and cpio cannot handle ultra-high speed tape drives like the LTO4. fbackup can handle any size file, runs up to 6 separate reader processes to keep the tape drive busy and adds high speed search marks for very fast restores of selected files.

So the fbackup-frecover pair continues to work at 11.31 and would be the fastest file-by-file transfer method with no limits on file size. rsync is also a great choice, especially if you must keep the machine online as long as possible. rsync (after the initial pass) will update only the changed files and directories and can scan millions of files in terabytes of filesystems in just a few minutes when there are just a few differences. rsync is probably not on your system -- get a copy from http://software.hp.com

dd is by far the fastest but requires a little more thought. It is a raw disk copy and with a block size of 1 to 4 MB, can run as fast as the arrays allow. You create lvols on the new array that match the current lvols, being careful to handle the boot disk for vg00 correctly.


Bill Hassell, sysadmin
Jeongbae Min
Advisor

Re: What is the best command to copy file from one system to the other

Hi Bill,

Thank you for your input.

We had files bigger than 2 GByte. then only option is DD.

I don't need to copy root volume group. what should I be careful and what is the exact command to copy files system from one to the other box.

Thank you in advance.
Bill Hassell
Honored Contributor

Re: What is the best command to copy file from one system to the other

> what should I be careful and what is the exact command to copy files system from one to the other box.

The fbackup/frecover given above by R.O. will work just fine. Filesystems simply sit inside an lvol, so if you want the same physical layout, you'll need to create the same volume group(s) and lvol(s) for the destination array. Naturally, the VG name will be different but can be changed later. Or you can rearrange the VG and lvol names and sizes but this assumes you can keep track of everything.

If you use fbackup+frecover, then use newfs for each lvol, then mount them under temporary directories and copy the files. Then verify the file and directory count with find+wc mentioned above.

With dd, you will still create the destination lvols and then for each of the volumes:

dd if=/dev/vg01/lvol1 of=/dev/vgnew01/lvol1 bs=2048k

Repeat for each lvol.

For the dd command, you'll be copying an active mountpoint and therefore the destination will need fsck to clear up incomplete pointers. For both methods, files will change during the copy so you need to understand if some files depend on others (like matching records) and resolve this with your applications -- or run the commands during a quiet maintenance period.


Bill Hassell, sysadmin
bullz
Super Advisor

Re: What is the best command to copy file from one system to the other

rsync command is always the best commnad for taking backup (or) copying files from one directory to other.

i will post the syntax soon.
James R. Ferguson
Acclaimed Contributor

Re: What is the best command to copy file from one system to the other

Hi (again):

> We had files bigger than 2 GByte. then only option is DD.

Not true. 'fbackup'/'frecover' handle largefiles just fine. Too, using 'pax' this can be accommodated also.

Regards!

...JRF...
Jeongbae Min
Advisor

Re: What is the best command to copy file from one system to the other


If I used a commend as below "cp -rp old_mount_point new_mount_point" instead of dd, cpio commands

do you think it has any problems ?
James R. Ferguson
Acclaimed Contributor

Re: What is the best command to copy file from one system to the other

Hi Jeong:

> if I used a commend as below "cp -rp old_mount_point new_mount_point" instead of dd, cpio commands do you think it has any problems ?

Make sure that the 'new_mount_point' doesn't exist when you begin the process. Since 'cp' creates the new directory, the destination directory should not already exist.

You will not preserve sparse files with 'cp'. Instead, they wilk be "un-sparsed".

The use of 'fbackup/frecover' as R.O. noted is a better alternative than 'cp' in my opinion.

Regards!

...JRF...
Jeongbae Min
Advisor

Re: What is the best command to copy file from one system to the other

Hi James,

Can you give me a good syntax for fbackup/fresore command to copy from one storage system to the other?

Thank you in advance

Jeong
James R. Ferguson
Acclaimed Contributor

Re: What is the best command to copy file from one system to the other

Hi (again) Jeong:

If you wish to use 'fbackup'/'frecover' you could do:

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

Regards!

...JRF...
Suraj K Sankari
Honored Contributor

Re: What is the best command to copy file from one system to the other

Hi,
If you satisfied with the answer and your problem got solved then

please make a habit to assign points,
Those people who give there valuable time for your problem they

should expect some apparition from you in terms of points.

To know how to assign points please go through the below link

http://forums13.itrc.hp.com/service/forums/helptips.do?admit=1094476

27+1256027208667+28353475#33

Thanks
Suraj