1819802 Members
3574 Online
109607 Solutions
New Discussion юеВ

cp or (fback & frestore)

 

cp or (fback & frestore)

Can anyone tell me which method is faster?
14 REPLIES 14
Patrick Wallek
Honored Contributor

Re: cp or (fback & frestore)

More details are DEFINITELY needed.

1) How much data? How many MB, GB, TB? How many files?

2) Is the data being copied from one filesystem to another on the same system?

2a) If the copy is going over the network, what speed is the network? Is it a LAN or a WAN?

3) Is there a specific time window this needs to be done?
Court Campbell
Honored Contributor

Re: cp or (fback & frestore)

Umm. It may just be me but this is an odd question. If you are just trying to backup a couple of files then use cp. But if you are trying to backup a complete filesystem, then you might want to use fbackup/frecover.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Pete Randall
Outstanding Contributor

Re: cp or (fback & frestore)

We really need more information. When you say cp, are you referring to just copying files with the cp command? From where and to where? When you say fback (I assume you're referring to fbackup), are you fbacking to tape? And then frestoring from tape?

A plain cp from one spot on the a machine to another spot on the same machine will obviously be faster that dumping something off to tape and then recovering it. Other than that, I can't really address your question.


Pete

Pete

Re: cp or (fback & frestore)

This is for a database migration, it 1.5 TB in size. The file system will be copied to another file system on the server. I have used fback & frestore to complete these types of data moves, my DBA is wondering which method is faster.
Jaime Bolanos Rojas.
Honored Contributor

Re: cp or (fback & frestore)

Tracey,

Faster o not faster, it would more like suitable or not:

cp:

"copy files and directory subtrees"
http://docs.hp.com/en/B2355-60127/cp.1.html

fbackup:

selectively back up files
http://docs.hp.com/en/B2355-60127/fbackup.1M.html

Regards,

Jaime.
Work hard when the need comes out.

Re: cp or (fback & frestore)

This is for a database migration, its 1.5 TB in size. The file systems will be copied to another file systems on the server. I have used fback & frestore to complete these types of data moves, my DBA is wondering which method is faster.
A. Clay Stephenson
Acclaimed Contributor

Re: cp or (fback & frestore)

There is probably not a lot of difference and besides the correct answer is to do the experiment and measure. One of the things that fbackup/frecover does buy you is preservation of owner/group for directories that is not guaranteed with cp -rp.

However, there is a method that you haven't mentioned that will be faster than either.
As long as the destination LVOL is at least as large as the source LVOL then do a raw copy using dd.

umount /source_file_system
dd if=/dev/vgsrc/rlvol1 of=/dev/vgdest/rlvol1 bs=1024k
mount /source_file_system
mount /dest_file_system

If part of what you are trying to do is expand the filesystem then make your destination LVOL as big as you like, do the dd, and then extend the filesystem after the transfer.
If it ain't broke, I can fix that.
Jaime Bolanos Rojas.
Honored Contributor

Re: cp or (fback & frestore)

Tracey,

If this is an Oracle database I would consider this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=957531&admit=-682735245+1178643965099+28353475


"The only "copy" mechanism that I would *not* use would be 'cp' since it will expand (pad with zeros) any sparse Oracle files."

Regards,

Jaime.
Work hard when the need comes out.
Steven E. Protter
Exalted Contributor

Re: cp or (fback & frestore)

Shalom,

1) cp requires the database be down to get a clean backup.
2) fback requries the database be in backup mode to get a clean backup.
3) DP5 or rman or veritas netback can get clean backups while the database is up, hot and doing transactions.

Answer: The right tool for the right job/situation. You've really not told us enough to provide a definitive answer.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Raj D.
Honored Contributor

Re: cp or (fback & frestore)

Tracey,

What storage are you using? You can use Open Migrator (formerly named Data Relocation Utility) and it will do the job on the fly, no need to bring down the databaase down.


Check this out:
http://www.emc.com/products/software/open_migrator/index.jsp


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "

Re: cp or (fback & frestore)

Thanks for for the responce, I think I got what I needed.

Re: cp or (fback & frestore)

Thanks again to all who replied.
Steven E. Protter
Exalted Contributor

Re: cp or (fback & frestore)

Shalom,

Please read this and perhaps take appropriate action. Welcome to the forums.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: cp or (fback & frestore)

fbackup and frecover are much, much faster than any HP-UX utility like tar, cpio, cp, etc. The reason is that fbackup (with the correct config file) will provide 6 separate processes to gather data and keep the tape busy. cp amd tar, etc are single threaded and too slow to keep a modern tape drive busy. Now this assumes several things:

you have a modern computer with 400 Mhz or faster processors,

you have more than 1Gb or RAM,

you have a modern tape drive that can handle 20-100 Mbytes/sec data rates or more

Now these are not pick-and-choose. A fast tape drive will be useless on a slow (less than 200 Mhz) machine. Similarly, a 1200 Mhz machine with 16 processors will be crippled with a DDS-2 tape drive.

If you don't run fbackup without a config file, it will be only slightly faster than cp.


Bill Hassell, sysadmin