Re: cpio problem
Posted in 1998
Topics: Storage & Space Management, Migration, Import/Export & Data Conversion
Leffler, Jonathan wrote:
>
> >----------
> From: Abhay Mannur[SMTP:abhay@cheerful.com]
> >Sent: Wednesday, March 04, 1998 6:55 AM
>
> >We have exported a database to a tape.
> >How can I edit the schema file before I import it.
>
> You can't.
This is not strictly true, you can dd the file in and then edit it, upto
the limitations of the OS anyway. It works on mickey-mouse systems.
Yes you can edit the schema, but then you have to ensure that the data
to be loaded is in the correct format.
Its not the hassle, import it as is, alter it and regenerate the tape.
> Do not ever allow dbimport to write the schema file (SQL file) to the tape; always
> use the -f option to ensure that the schema is stored separately. Amongst other things,
> the format on the tape has the schema information distributed in amongst the data information.
> The only time it is legitimate to let dbexport write the schema to tape too is when you will
> never need to change the schema on import. This might apply if you are using dbexport
> as an archive mechanism. But for ordinary use, ensure that the SQL file is written to disk,
> even if the data isn't. And, if you've got enough disk space (a BIG 'if' these days), then
> dbexport to disk and then write to tape is easiest.
>
> >I tried cpio to copy the whole tape on the disk but it is giving me
> '>Out of Phase' error. What should be the cpio command to extract
> >everything on disk.
>
> The format on the tape is *NOT* cpio format. It is dbexport/dbimport format.
> If you write the tape from a dbexport to disk, then it will be in cpio format (or tar,
> or pax, or whatever you used to create the tape).
> If you let dbimport write the tape, it is in its own proprietary (and undocumented) format.
It might be undocumented, but it is very straightforward - table DDL,
data area.
>
> Yours,
> Jonathan Leffler (jleffler@visa.com)
> #include <bother.ms-exchange.h>
> #include <do-not-do-it.h>
--
Paul Watson #
WF Software Ltd # It said run using Windows 95
Tel: +44 1436 674629 # or better in the manual
Fax: +44 1436 678693 # so I used Unix
www.wfsoftware.co.uk #