How to backup the database on the raw device to the filesystem using 'dd'. (117 Views)
Reply
Advisor
Claude Lanouette_1
Posts: 28
Registered: ‎11-03-2005
Message 1 of 5 (117 Views)

How to backup the database on the raw device to the filesystem using 'dd'.

I NEED TO KNOW THE SOLUTION FOR HP-UX ???

HOW TO SET THE skip= FOR HP-UX.
WHAT IS THE APPROPRIATE VALUE=0,1,2,3,4...???


THIS IS THE SOLUTION FOR AIX SERVER FROM ORACLE METALINK SITE.
Solution Description:
=====================

The following commands will allow you to copy a raw device to the filesystem
and restore from the filesystem to the raw device.

You must use the dd command to copy from the raw device.

Please Note:
============
1. Caution is required because some AIX backup programs ignore large
files; you must verify that any oversized AIX files are indeed
backed up.

2. When doing copy/backup operations, please consider the 4KB
offset (taken by Oracle) for the Logical Volume Control Block(LVCB) at
the beginning of all IBM Virtual Shared Disks when performing
backup/restore operations.

Copying to Filesystem
--------------------------

Use the command:

% dd if= of= bs=
skip=

Example:
% dd if=/dev/rVh09.za.716c1 of=/a/spdevs04/ibmfs/osupport/dismith/test.ctl
bs=4096 skip=1

In the above example we specify the blocksize as 4096 bytes and skip 1 block
for the offset for the Logical Volume Control Block(LVCB)

bs=BlockSize - Specifies both the input and output block size,
superceding the ibs and obs flags. The block size values specified with
the bs flag must always be a multiple of the physical block size for the
media being used.

skip=SkipInputBlocks - Skips the specified SkipInputBlocks value of
input blocks before starting to copy.

Restoring from Filesystem
--------------------------

Use the command:

% dd if=/a/spdevs04/ibmfs/osupport/dismith/test.ctl of=/dev/rVh09.za.716c1
bs=4096 seek=1

In the above example we specify the blocksize as 4096bytes and seek 1 block
past the beginning of output file before copying, so we will not
overwrite the Logical Volume Control Block(LVCB)

seek=RecordNumber - Seeks the record specified by the RecordNumber
variable from the beginning of output file before copying.
Please use plain text.
Honored Contributor
Robert-Jan Goossens_1
Posts: 1,813
Registered: ‎04-04-2000
Message 2 of 5 (117 Views)

Re: How to backup the database on the raw device to the filesystem using 'dd'.

Hi Lanouette.
--
When doing copy/backup operations, please consider the 4KB offset (taken by Oracle) for the Logical Volume Control Block(LVCB) at
the beginning of all IBM Virtual Shared Disks
--
This is specific for this IBM AIX, Nelson shared this command for hpux.

dd if=/dev/sapdata/rora001dbf bs=1024k of=/cheapsataraid/rora001.dd

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1031872

Hope this helps,
Robert-Jan
Please use plain text.
Advisor
Claude Lanouette_1
Posts: 28
Registered: ‎11-03-2005
Message 3 of 5 (117 Views)

Re: How to backup the database on the raw device to the filesystem using 'dd'.

Hi Robert-Jan,


I dont have to make backup on tape, to make on filesystem the setup command did you means i have to set the skip= at 4Kb in my comman line ?

Example:
dd if= of= bs=4096 skip=4

tanks
Please use plain text.
Acclaimed Contributor
A. Clay Stephenson
Posts: 17,825
Registered: ‎07-16-1998
Message 4 of 5 (117 Views)

Re: How to backup the database on the raw device to the filesystem using 'dd'.

Whether to tape or disk, under HP-UX there is no need to do an initial seek, just start at the beginning of the LVOL. Now having said this, dd is really a terrible tool to rely upon for critical backups because there is no error recovery nor anyway to know if you actually got the data that you wanted. Dd is dumb as dirt. For a production environment, you should be thinking about using RMAN or a commercial backup suite like Data Protector.
If it ain't broke, I can fix that.
Please use plain text.
Advisor
Claude Lanouette_1
Posts: 28
Registered: ‎11-03-2005
Message 5 of 5 (117 Views)

Re: How to backup the database on the raw device to the filesystem using 'dd'.

Tanks all....
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation