System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to take and restore from dd

SOLVED
Go to solution
Avinash20
Honored Contributor

How to take and restore from dd

Hi Gurus,

Since fbackup(1M) from 11.31 cannot be restored to fbackup to 11.23, I am forced to dd since files are more than 8 Gb

Please let me know the command syntax via dd to take the backup of mutiple folders to tape drive and the procedure to restore the same

I am little confused with dd(1)

Points will be assigned appropriately !!
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
15 REPLIES
john123
Trusted Contributor

Re: How to take and restore from dd

Consider to use tar..
It should be a better option than dd for file system backup
Analyst
Trusted Contributor

Re: How to take and restore from dd

Hi Avinash,

plz check the syntax

dd if =device name of=device name bs=blocksize in kb

dd if=/dev/rdsk/c1t2d0 of=/dev/dsk/c2t2d0 bs=1024k

Thnaks,
Analyst.
James R. Ferguson
Acclaimed Contributor
Solution

Re: How to take and restore from dd

Hi:

Since you can't use 'frecover' to restore an 11.31 'fbackup' archive to 11.23 or earlier, I would use 'pax' to perform your backup. By using the '-x pax' archive format you can exceed the former 8GB limit when you create the archive.

Then, on 11.23, install the 'PAX-Enh' product to enable reading the large files:

http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PAX-ENH

Regards!

...JRF...
Steven Schweda
Honored Contributor

Re: How to take and restore from dd

> [...] I am forced to dd since files are
> more than 8 Gb

> Consider to use tar..

_GNU_ "tar" should be able to do it. "dd"
seems (to me) to be an inappropriate tool for
a job like this.

> [...] I would use 'pax' [...]

Should also be good, if your "pax" programs
are new enough.
Avinash20
Honored Contributor

Re: How to take and restore from dd

John: Will tar work for more than 8GB
http://docs.hp.com/en/5992-4616/ch03s04.html#bajcadeg

Analyst: Its good, but the command is good for device backup
Do we have command to take backup for directory

James:
This is what I was expecting.

Steven: Thanks for your advice on dd
GNU tar: Its open-source !!
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: How to take and restore from dd

I have some queries on pax, just let me test on my server and come back after some time
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: How to take and restore from dd

How do I take backup/restore via pax for following command

fbackup -v -f /dev/rmt/1m -i /u01

To take the fbackup via pax

# pax -w -f /dev/rtape/tape4QIC150 /u01 -x pax

How do I restore it.
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Dennis Handly
Acclaimed Contributor

Re: How to take and restore from dd

# pax -w -f /dev/rtape/tape4QIC150 /u01 -x pax
>How do I restore it?

Pretty much the same as tar except the options are rationalized:
# pax -r -f /dev/rtape/tape4QIC150 -p e
Avinash20
Honored Contributor

Re: How to take and restore from dd

I am continuing the thread so that we could be aware of the impact of the speed at which the backup runs

It took 3.5 Hrs for 260GB database using pax and same is taking only 2.5 Hrs for the same size using fbackup.

Do we have any docs which refer to the speed at which the backup tools takes time

Are there any options in pax command which gives total time at end, like fbackup does ??
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Dennis Handly
Acclaimed Contributor

Re: How to take and restore from dd

>It took 3.5 Hrs for 260 GB database using pax and same is taking only 2.5 Hrs for the same size using fbackup.

pax is NOT an industrial strength backup tool. There is only one reader so it can't keep the backup tape up to speed. Also, what is the default block size you are writing to tape? For -x pax it is 5120. This is probably too small.

>Are there any options in pax command which gives total time at end

In spirit of UNIX, you can simply use time:
time pax ...
Laurent Menase
Honored Contributor

Re: How to take and restore from dd

5120 block size by default is very low.
you should try the option -b 32768
or even if you want to try more:
# pax -w -f /dev/rtape/tape4QIC150 /u01 -x pax -b 32768

# pax -r -f /dev/rtape/tape4QIC150 -p e -b 32768

if you want to test with a larger block size:
for instance 64k
# pax -w /u01 -x pax | dd ibs=8k obs=64k of=/dev/rtape/tape4QIC150

and to read then
dd bs=64k if=/dev/rtape/tape4QIC150 |pax -r -p e

Bill Hassell
Honored Contributor

Re: How to take and restore from dd

> Since fbackup(1M) from 11.31 cannot be restored to fbackup to 11.23, I am forced to dd since files are more than 8 Gb

It is truly sad that a high quality backup program is being removed from future HP-UX releases. fbackup will handle terabyte files and has since large files were introduced many years ago. The 8GB limit applies to certain versions of tar and pax.

> It took 3.5 Hrs for 260GB database using pax and same is taking only 2.5 Hrs for the same size using fbackup.

Actually, that seems slow for fbackup. If you did not use an fbackup config file, you are missing out on a much faster backup speed. Unlike primitive file backup programs like tar and pax, fbackup uses a shared memory pool and multiple disk readers to keep the tape busy. Modern tape drives are too fast for tar and pax and will be unable to run at full speed. Perhaps you can provide details on why fbackup is failing.

As far as dd, this is the worst backup method there is since there is no table of contents, no label and it will be impossible to recover from a tape read error. dd does not have a retry or a skip bad block feature. dd is useful for disk to disk (hence the name dd) but tapes are not always reliable and you could lose everything with a bad spot.

Other than fbackup, the only recommendation is Data Protector which is an enterprise quality backup program. It has no filesize limitations (whatever HP-UX can handle), and performs the same type of data pooling for high performance. It has retries and skip bad spots as well as an index even for raw backups. Don't buy it if your data isn't worth anything. But if your data is valuable, there is no price too high to be able to reliably restore from your backups.


Bill Hassell, sysadmin
James R. Ferguson
Acclaimed Contributor

Re: How to take and restore from dd

Hi (again):

I couldn't agree more with Bill's sentiments that it is truly sad the HP would cease support of 'fbackup' and 'frecover' in future releases.

I would hope that Dennis or Laurent might shed some light on the rationale (if it could be called that) for this path. As a HP-centric tool for quick backups and data migrations this is a loss. I understand that the open-standard 'pax' is the stated way forward, but the loss of the aforementioned tools lessens to some degree the additional value HP brings to Unix.

Regards!

...JRF...
Avinash20
Honored Contributor

Re: How to take and restore from dd

Solution stated above

Also labs are working on enhancement in pax (graph etc. like fbakcup does) in Mar 2009 :)
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
OldSchool
Honored Contributor

Re: How to take and restore from dd

"enhancement in pax (graph etc. like fbakcup does..."

I wonder where that came from, as there are (or at least, were) standards for pax, and that implies interoperability.