Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: linux cp command to archive database?

Re: linux cp command to archive database?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 24 Jun 2004 05:34:14 -0700
Message-ID: <2687bb95.0406240434.7a64df8d@posting.google.com>


"joe haydn" <nospam_at_nospam.com> wrote in message news:<XMnCc.11598$bs4.1712_at_newsread3.news.atl.earthlink.net>...
> hi all. We're working on an oracle server, linux (suse 7.3) based, in
> migrating to a faster machine with bigger harddrive. First we plugged in the
> correctly partitioned harddrive from the new machine, then booted off the
> Oracle server via a knoppix cdrom, and mounted both hda and hdb, and did:
>
> > cp -a /mnt/orig/* /mnt/dest/
>
> to copy everything from the original to the new harddrive (I know this
> command is sufficient in cloning the system).
>
> The cp command gave an error to the following files pertaining to the oracle
> (9) database:
>
> exampl01.dbf
> control01.ctl
> control02.ctl
>
> It said "cp: Input/output error".
>
> Could this imply the harddrive corrupt (like bad sectors), or is there
> something that I don't know about Oracle database files, which possibly be
> preventing from using te"cp" command? It shouldn't matter if it's Oracle
> database or any file, that cp command can manipulate, correct? We're using
> Reiser filesystem btw.
>
> I could do "dd" to clone the server harddisk, but if it's bad sector
> problem, then that wouldn't be a solution anyway.
>
> any input I appreciate,

One of the first horror stories I heard related to Oracle was from a DBA who used cp to backup his database. The cp command ran cleanly. One day the DBA's had to recover the database only to discover after laying all the files back down that Oracle would not start. It turns out the database used raw partitions and while cp said it copied the files cp cannot correctly copy a raw partition. You have to use "dd" for that.

This may not be your problem but if your database files are raw partitions be glad your UNIX (Linux) version of cp gives you an error.  If your files are not raw partition then what kind of file system are you using. If it is a vendor provided, rather than native, file system then perhaps you need to use a vendor specific copy program.

Good luck. By the way doesn't your OS come with a disk ckecking utility like fsck that you can run to test the file system/disk?

HTH -- Mark D Powell -- Received on Thu Jun 24 2004 - 07:34:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US