sve pise u manualu:
Citat:
For InnoDB tables, mysqldump provides a way of making an online backup:
shell> mysqldump --all-databases --single-transaction > all_databases.sql
This backup just needs to acquire a global read lock on all tables (using FLUSH TABLES WITH READ LOCK) at the beginning of the dump. As soon as this lock has been acquired, the binary log coordinates are read and the lock is released. If and only if one long updating statement is running when the FLUSH statement is issued, the MySQL server may get stalled until that long statement finishes, and then the dump becomes lock-free. If the update statements that the MySQL server receives are short (in terms of execution time), the initial lock period should not be noticeable, even with many updates.
|
sto se myisam tabela tice, tu se AFAIK lokovanje radi na svakoj tabeli ponaosob, tabela po tabela, kako se dumpuje. Znaci ne garantuje se referential integrity baze, sluzi samo da se obezbedi da svi dumpovani rekordi budu celi. Postoji opcija --lock-tables ili -l koja sluzi da se zakljuca cela baza dok traje dump, ukoliko je nephodno osigurati ref.integritet. Naravno to znaci da ce sve operacije nad podacima morati da sacekaju da se dump zavrsi, ali i dalje je to bolje nego ugasen mysql zato sto obicno ima vise od jedne baze na serveru, nema nekog razloga da ti ostali sajtovi ne rade dok ti bekapujes jedan...