> The general answer to your question, if you're willing to cooperate > with the server, is to lock the tables from within the server so that > no other clients can modify them, and use FLUSH TABLES to flush any > changes to disk. While the lock remains in place, copy the table > files. Then unlock the tables. Remember that the client that locks > the table *must remain connected* while you copy the table files, because > any locks are released automatically when the client connection ends. > > Have a look at the mysqlhotcopy source for any idea of how it uses > this approach. Essentially, what it does is open a connection to the > server, tells the server to lock the tables, and then while the tables > are locked, goes "behind the server's back" to directly copy table files. > (This is why mysqlhotcopy must be run on the server host. It's also > (I believe) why it doesn't work on WIndows: Windows file locking > semantics do not allow you to copy a file while the server has it locked.) > > By the way, it's difficult to see how automysqlbackup could corrupt any > tables. A quick look through it seems to indicate that it only uses > mysqldump to perform backups.
Yes the script is using mysqldump with --opt , so these seems like what to expect for mysqlhotcopy. When you read the MYSQL docs, mysqlhotcopy apears to be the tool for choice for live servers. Maybe I'm not interpeting the documentation correctly, maybe it refers to having to be on the SAME server to run. I want the automysqlbackup script to run from cron at 4am..one site in question is very busy still during that time. What does the user experience who may in the middle of a write action to the database as the server starts the mysqldump --opt process? How can I do myisamchk with tables locked to make sure the tables are not corrupt before I try this shell script again? I want to make sure I start clean before I try it so that if it repeats the problem I can relate the problem to the action just performed. Mark Súsol ------------------------------- u l t i m a t e CreativeMedia Web | Print | CD Media | eCommerce www.ultimatecreativemedia.com Ph: 301-668-0588 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]