[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Backup von MySQL Datenbanken



Marc Haber schrieb am Sonntag, 06. Juli 2008 um 23:09:34 +0200:
> Muss ich hierzu MySQL stoppen, oder gibt es eine Möglichkeit, den
> MySQL-Daemon dazu zu bringen, seine Dateien in einen ordentlichen
> Zustand zu bringen?


aus der mysql-docu zum befehl FLUSH:

# TABLES WITH READ LOCK

Closes all open tables and locks all tables for all databases with a
read lock until you explicitly release the lock by executing UNLOCK
TABLES. This is very convenient way to get backups if you have a
filesystem such as Veritas that can take snapshots in time.

FLUSH TABLES WITH READ LOCK acquires a global read lock and not table
locks, so it is not subject to the same behavior as LOCK TABLES and
UNLOCK TABLES with respect to table locking and implicit commits:

    * UNLOCK TABLES implicitly commits any active transaction only if
      any tables currently have been locked with LOCK TABLES. The commit
      does not occur for UNLOCK TABLES following FLUSH TABLES WITH READ
      LOCK because the latter statement does not acquire table locks.
    * 
      Beginning a transaction causes table locks acquired with LOCK
      TABLES to be released, as though you had executed UNLOCK TABLES.
      Beginning a transaction does not release a global read lock
      acquired with FLUSH TABLES WITH READ LOCK.




-- 
Jörg Friedrich

There are only 10 types of people:
Those who understand binary and those who don't.


Reply to: