I'm still having bizarre problems with mysqlhotcopy and I'm wondering if there is an underlying problem.... MySQL 3.23.36 (happened on 35 too) mysqlhotcopy v1.11 RH 6.1, updated as necessary Perl 5.6.0 DBI/DBD up to date. I backup around 10 databases with a total of 188 tables. Most tables are small except for one with around 55,000 rows. I've done a bunch more debugging with no luck. When mysqlhotcopy runs as a cron job at night as the mysql userid, it usually fails when it tries to lock the tables. Most of the time I get "do failed "Incorrect information in file" at line 381 (which is the LOCK TABLES command) The table it fails at is never the same. It seems random across various databases, even one which never gets used. After I see the cron log, I'll login, switch to my mysql user (which the cron job runs as too), and run the backup manually. It'll work fine!! But the backup fails again that night. For kicks, I modified mysqlhotcopy to LOCK the tables one database at a time since that is where the error occurs. I thought maybe there was a problem locking 188 tables at once (Though I realize SQL commands can be very very long) I took this modified script and had it run 4 times via cron, five minutes apart. Generally, the first occurance would run fine. But the next 3 would all fail. Once in a while I'll get an Error 126, unable to open file, which seems to be some type of table problem that was caused by a previous failed hotcopy attempt. At this point, even a manual backup fails on the same table. myisamchk -r fixes that, then the hotcopy will run once via cron, then start failing again with teh 'Incorrect Information in file' on a random table. >From the command line, the problem rarely if ever occurs. It takes about 10 seconds to backup all the files. So I sat down, did a myisamchk -r for good measure, and ran the backup dozens of times from a Xterm. (Hit up arrow, hit enter) It ran fine, didn't fail once. This makes no sense. How could running mysqlhotcopy from cron (as the same user I used above when it worked) make a difference? I've checked to see if maybe there was something else fighting with the backup - nope - no cron jobs scheduled near it. I thought maybe something I was running was corrupting a table - but it happens across the databases, once of which isn't used anymore. Has anyone else seen this type of behavior? It has me totally confused and ready to switch back to mysqldump. mysqldump would work fine - never had a problem with it. What exactly does 'Incorrect information in file' indicate anyway? Still plugging away.... Mike -------- Original Message -------- Subject: Odd mysqlhotcopy behavior Date: Fri, 30 Mar 2001 10:28:28 -0500 From: Mike Baptiste <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] For the longest time, I'v ebacked up my various MySQL databases using mysqldump. However, I hated restarting the database each night (on a few occasions it would restart but the databases could not be accessed until it was restarted again) Plus I think mysqlhotcopy is a more elegant solution. OK, so I recently went ahead and tried using mysqlhotcopy. Nothing fancy. /usr/bin/mysqlhotcopy -u user -p pw --allowold --flushlog [names of 10 databases] /home/mysql/backup When I run it manually, it works great. Locks all the tables, copies the files, wonderful. However, I'm having trouble running it via a cron job. My /etc/crontab entry runs the above command as user mysql (which has full access to all the database files and the backup directory) I always get the same error: DBD::mysql::db do failed: Incorrect information in file: './slash/sortcodes.frm' at /usr/bin/mysqlhotcopy line 381. It occurs on different lines and on different tables in different databases. When I run the command manually the next morning - it works MOST of the time though sometimes I do get the Incorrect information error then too - trying again usually fixes it. I've myisamchk'ed the tables - thinking that might be the issue - nope. I searched the archives - couldn't really find anything about this. Its a RedHat 6.2 box running 3.23.35 and now .36 I'm using Perl 5.6.0 and my version of DBI and DBD are up to date according to CPAN. Any ideas? Mike --------------------------------------------------------------------- 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