athomason has asked for the wisdom of the Perl Monks concerning the following question:
The solution I've been pursuing is creating a pair of DBI scripts with the dumper useing SHOW TABLES, DESCRIBE, and SELECT to retrieve the data and the restorer using CREATE DATABASE, CREATE TABLE and INSERT to put it back. I looked at DBIx::Copy, but that assumes the table structure exists already; I'd like the scripts to be able to handle an entire arbitrarily shaped database without command-line handholding. The structure returned by DESCRIBE looks somewhat painful and perhaps even insufficient for correctly recreating the table. I've written some code to manage the dump (posted in a reply under this thread), but I'm scared of writing the restorer :-). So, fellow Monks, I submit to you there might be an easier way to do this, hopefully using non-MySQL-specific commands, and if so, I'd love to hear it before doing unnecessary coding.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Dumping a Database via DBI
by athomason (Curate) on Jun 29, 2000 at 01:26 UTC | |
|
Re: Dumping a Database via DBI
by plaid (Chaplain) on Jun 29, 2000 at 01:33 UTC | |
|
Re: Dumping a Database via DBI
by infoninja (Friar) on Jun 29, 2000 at 01:31 UTC | |
by athomason (Curate) on Jun 29, 2000 at 01:36 UTC | |
by Russ (Deacon) on Jun 29, 2000 at 10:07 UTC | |
|
(jcwren) RE: Dumping a Database via DBI
by jcwren (Prior) on Jun 29, 2000 at 03:30 UTC | |
|
Re: Dumping a Database via DBI
by Anonymous Monk on Jun 29, 2000 at 03:43 UTC | |
|
Re: Dumping a Database via DBI
by lhoward (Vicar) on Jun 29, 2000 at 01:40 UTC |