hi.

w/r/t your first question:  mysqldump just generates a text file containing
the sql statements necessary to recreate the dumped table(s).
if you use mysqldump -uuser -p > dumpfile.txt you can open it in vi or
notepad and edit it if desired...
the error about the table existing is because the generated file by default
has the table creation statement in it.
use mysql -t or mysql --no-create-info to eliminate this.
run mysqldump with no arguments to see the full usage info.
the duplicate keys error would most likely be because you have existing rows
in your table that conflict with the insert statements...pipe the output to
a file instead of straight to mysql(if that's what you're doing), then check
out what exactly's failing.

2nd question:
replication's good if you need a 'live' secondary...for instance, at my last
job we used a replicated secondary database to run intensive up-to-date
statistic queries that otherwise would have locked important tables. (pre
row-level locking table types, of course).
if you just want backups made at intervals, i'd just dump all/important
tables to a file periodically via cron.

that's just me.

hth.

-ravi.

-----Original Message-----
From: Joe Taraba [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 04, 2001 1:48 PM
To: [EMAIL PROTECTED]
Subject: Replication, update log, mysqldump???


Hi;

I'm trying to learn MySQL, having some difficulties understanding backup
strategies.

mysql  Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686)

Where is the documentation (besides man pages) for mysql  Ver 3.22.32

According to the the 3.23.29 online docs it appears that there are four
ways to go:

Replication
update log
mysqldump
mysqlhotcopy script

The mysqlhotcopy script is apparently not available for my version so I
manually backed-up (copied) all the *.frm, *.MYD, and *.MYI files for each
database, so I know the usefulness of that approach--sort'a.

I tried mysqldump on an existing database, and then tried to load it back
and got several types of errors.

1. Table exists errors, so I deleted all the *.frm, *.MYD, and *.MYI files
for that database.
2. I tried to load the dumpfile again and got errors about duplicate keys.

This database is not visible to anyone right now, so there were no
activities going on. This is an exact copy of a functioning customer
database.

I haven't tried using the update log, nor do I fully understand it's
usefulness. The online docs say not to use it for versions later than
<quote> Now that master-slave internal replication is available starting in
Version 3.23.15, using the update log to implement replications is not
recommended. See section 11 Replication in MySQL. </quote>

Replication, I guess is not available for my version either. I glanced
briefly at the docs on Replication--it looks pretty nifty.

So I guess there are actually two questions here:

1. Why the errors from mysqldump (reload) from an apparently perfectly good
database?

2. Should I upgrade my version of MySQL and follow the Replication
procedures?

A ton of thanks from anyone not taking a holiday (USA) today.

Joe


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to