Re: mysqlhotcopy errors osx
DBD::mysqlPP is the pure Perl driver for DBI. Is there a reason you are using that instead of DBD::mysql? I haven't done Perl/MySQL on OS X before but on other platforms (and from the error you're getting here) DBD::mysql is the typical driver for using DBI with MySQL. It also is the driver that mysqlhotcopy is built to use. Mike James Tu wrote: The first time I tried to run the mysqlhotcopy script, I got an error that indicated that Perl couldn't find the DBI module. So, I found a site (http://www.quicomm.com/apm_dbddbi.htm) that stepped me through making and installing MySQL DBD and the DBI modules(? don't know if I'm using the right terminology here) However, during the 'make' step of the DBD module I got a warning: prompt$ sudo Perl Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite Net::MySQL 0.08 not found. Writing Makefile for DBD::mysqlPP So I decided to try to 'make install' anyway and I got... $ sudo make install Installing /Library/Perl/5.8.6/DBD/mysqlPP.pm Installing /usr/local/man/man3/DBD::mysqlPP.3pm Writing /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBD/mysqlPP/.packlist Appending installation info to //System/Library/Perl/5.8.6/darwin-thread-multi-2level/perllocal.pod trying to run mysqlhotcopy again, I got... $ mysqlhotcopy --dryrun imaginon install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at (eval 7) line 3. Perhaps the DBD::mysql perl module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right. Available drivers: DBM, ExampleP, File, Proxy, Sponge, mysqlPP. at /usr/local/mysql/bin/mysqlhotcopy line 178 line 178 of the script looks like: my $dbh = DBI->connect("dbi:mysql:$dsn;mysql_read_default_group=mysqlhotcopy", $opt{user}, $opt{password}, should I change the "dbi:mysql" part to "dbi:mysqlPP" ??? or should I fix the earlier warning about Net:MySQL 0.08 not found first. Do I just install the Net package? ...OK I actually downloaded and installed Net:MySQL... sudo Perl Makefile.PL sudo make sudo make test sudo make install ...all went ok then I did the same steps for DBD ...all went ok and no warnings... But I'm still getting the same 'line 178' error. What am I not doing correctly? Thanks. -James --MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQLHotCopy
Sorry pal: It runs on Unix and NetWare. What version are you using? I assume Windows at least ( if still looking for an .exe :-) ) Then please read this: http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html "8.13. mysqlhotcopy — A Database Backup Program Aaah. I missed that. Shows how much I read. I went to mysql.com and did a search for MySQLHotCopy, and it turned up this document. I glanced over it quickly and saw that it was just telling me how to run it, but I didn't catch the "Pearl Script" thing at the very start of the document. I am running Windows XP Pro on my development, and Windows Server 2003 on our actual production machine. While I've got access to Linux here on my development network, I do not on our server. So, I will stick to MySQLDump for the backup then. Thanks for the help. Jesse -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQLHotCopy
Jesse wrote: I read in the manual that MySQLHotCopy would be better than MySQLDump for backing up MyISAM tables. However, I cannot find a .exe in the bin directory by that name. I found a script by that name in a 4.1 installation that I have, but I don't think it's the latest version. Is this a script? If so, does anyone know where can I get the latest copy? I've checked MySQL.com, but can't seem to find it there. Thanks, Jesse Sorry pal: It runs on Unix and NetWare. What version are you using? I assume Windows at least ( if still looking for an .exe :-) ) Then please read this: http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html "8.13. mysqlhotcopy — A Database Backup Program mysqlhotcopy is a Perl script that was originally written and contributed by Tim Bunce. It uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a database backup quickly. It is the fastest way to make a backup of the database or single tables, but it can be run only on the same machine where the database directories are located. mysqlhotcopy works only for backing up MyISAM and ARCHIVE tables. It runs on Unix and NetWare. " -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Mysqlhotcopy and replication
Excellent Dan! Thanks! -Original Message- From: Dan Buettner [mailto:[EMAIL PROTECTED] Sent: Thu 6/29/2006 4:35 PM To: Jeff Cc: mysql@lists.mysql.com Subject: Re: Mysqlhotcopy and replication Jeff, that is indeed the case - the replication thread will "freeze" just like any other thread, and pick up where it left off. In fact, the statements are still replicated to the slave by the replication thread, stored in the slave's relay-bin file I think. Therefore even though the slave data is not being updated, the slave is in a sense staying current with the master even during the hotcopy (though you would have to wait for all those statements to be applied for the data to be synchronized). Dan On 6/29/06, Jeff <[EMAIL PROTECTED]> wrote: > I've got a replication slave db (all MyISAM tables) that I currently > back up every night by stopping MySQL, tarballing the table files, then > starting MySQL up again. > > I'd like to use Mysqlhotcopy to do this so that the db can stay up for > reads while the backup is being done. Here's my question. While the > tables are flushed with read lock, what becomes of all the Insert,Update > and delete queries that come in via replication? Will they be applied > after the backup is done and the tables unlocked? > > Thanks, > > Jeff > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > >
Re: Mysqlhotcopy and replication
Jeff, that is indeed the case - the replication thread will "freeze" just like any other thread, and pick up where it left off. In fact, the statements are still replicated to the slave by the replication thread, stored in the slave's relay-bin file I think. Therefore even though the slave data is not being updated, the slave is in a sense staying current with the master even during the hotcopy (though you would have to wait for all those statements to be applied for the data to be synchronized). Dan On 6/29/06, Jeff <[EMAIL PROTECTED]> wrote: I've got a replication slave db (all MyISAM tables) that I currently back up every night by stopping MySQL, tarballing the table files, then starting MySQL up again. I'd like to use Mysqlhotcopy to do this so that the db can stay up for reads while the backup is being done. Here's my question. While the tables are flushed with read lock, what becomes of all the Insert,Update and delete queries that come in via replication? Will they be applied after the backup is done and the tables unlocked? Thanks, Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Mysqlhotcopy / Perl / DBD::mysql on RHEL 4 x86_64
Solved -- After upgrading to 5.0.22, DBD::mysql builds without any problems. -Original Message- From: Tim Lucia [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 4:17 PM To: mysql@lists.mysql.com Subject: Mysqlhotcopy / Perl / DBD::mysql on RHEL 4 x86_64 I'm running on a Xeon 3.8 under RHEL V.4. I wanted to try out mysqlhotcopy, but it says I need DBD::mysql. Cpan gets it for me, but make DBD::mysql dies with the below error. I am using 5.0.18 standard (MySQL-server-standard-5.0.18-0.rhel4). Attempting to install perl-dbd-mysql off the RPMS directory on the RHEL V.4 installation media complains about a missing client library and points me off to a 4.1 rpm, which I do not want. Anyone have this same problem? Or clues how to fix this? Thanks, Tim Here's the error: gcc -c -I/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBI -I/usr/include/mysql -g -pipe -march=i386 -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m64 -DVERSION=\"3.0006\" -DXS_VERSION=\"3.0006\" -fPIC "-I/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE" dbdimp.c dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set make: *** [dbdimp.o] Error 1 -Original Message- From: Dan Buettner [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 3:55 PM To: Robinson, Eric Cc: mysql@lists.mysql.com Subject: Re: Server Load Question Eric, I sent you a note about hardware this morning as well, but here's a further thought - Don't know if this is the case, but is this the exact same application served to 100 different customers? And are Database-2 and Database-3 the same for every customer? Some kind of reference info perhaps? If so, split those off into a single "reference" database and share it across all your customers - you'll have an easier time managing MySQL, and you should gain something in performance due to MySQL being able to effectively cache some of the info. Maybe that's not what you've got but thought I'd mention it in case. Dan Robinson, Eric wrote: > I asked this question previously but didn't get much response so I'll > try again. > > Our server will be home to 100 separate clients. Each client will have > their own set of databases that will be accessed by 10-60 users at > each client's site. > > Each client has 3 databases. > > Database-1: 500 tables. 13 tables sized 10-100MB. Remaining tables all > less that 10MB. (This is the only database that is updated. The others > are just for reference.) Main table grows at a rate of a few hundred > MB/year. > > Database-2: 50 tables. 3 tables sized 10-100MB. All other tables less > than 10MB. No data growth. > > Database-3: 179 tables. 10 tables sized 1-15MB. All other tables less > than 1MB. No data growth. > > So... > > Total databses: 300 > Total tables: 72,900 > > Q: In terms of performance, is it better for each customer to have its > own instance of MySQL, each serving 3 databases, or is it better to > have one instance of MySQL serving 300 databases? > > --Eric > > > > > > Disclaimer - June 19, 2006 > This email and any files transmitted with it are confidential and > intended solely for [EMAIL PROTECTED] If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of Physician Select Management (PSM) or Physician's Managed Care (PMC). Warning: Although the message sender has taken reasonable precautions to ensure no viruses are present in this email, neither PSM nor PMC can accept responsibility for any loss or damage arising from the use of this email or attachments. > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy regexp
Thanks, but this not work to (output with --debug) $VAR1 = []; No tables to hot-copy at /usr/local/bin/mysqlhotcopy line 390. /usr/local/bin/mysqlhotcopy Ver 1.22 mysql-4.1.16 perl, v5.8.5 built for i586-linux-thread-multi Linux camel 2.6.8-24.16-default > You should just be doing > > mysqlhotcopy ...connect-options... --regexp /~^db_name$/ > or > mysqlhotcopy ...connect-options... --regexp /~^db_name$/ /path/to/new/dir > > On 5/25/06, MF <[EMAIL PROTECTED]> wrote: > > Hi, how to write pattern for backup all datases except one? > > > > I try this, but not work as expecting. > > mysqlhotcopy ...connect-options... --regexp /~^db_name$/./.*/ > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy regexp
You should just be doing mysqlhotcopy ...connect-options... --regexp /~^db_name$/ or mysqlhotcopy ...connect-options... --regexp /~^db_name$/ /path/to/new/dir On 5/25/06, MF <[EMAIL PROTECTED]> wrote: Hi, how to write pattern for backup all datases except one? I try this, but not work as expecting. mysqlhotcopy ...connect-options... --regexp /~^db_name$/./.*/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy
Hi, this is the solution I use: /usr/local/bin/mysqlhotcopy -p mypass --allowold 'mydb./~(expirations|rtt)$/' /var/backups/mysqlbackup/$1 I guess this one is also possible: /usr/local/bin/mysqlhotcopy -p mypass --allowold 'mydb./~^(expirations|rtt)$/' /var/backups/mysqlbackup/$1 Kind regards, Peter Imran Chaudhry wrote: Good stuff Peter, can you tell us your solution so folks can benefit from your efforts? (I expect the regex has to be POSIX style such as: mydb./'~(expirations|rtt)'/ right?) Imran Chaudhry -- http://www.ImranChaudhry.info MySQL Database Management & Design Services -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy
Good stuff Peter, can you tell us your solution so folks can benefit from your efforts? (I expect the regex has to be POSIX style such as: mydb./'~(expirations|rtt)'/ right?) Imran Chaudhry -- http://www.ImranChaudhry.info MySQL Database Management & Design Services -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy
solved :) Thanks :-) Peter wrote: Hello, I read the manual(http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html) and especially: " Back up tables in the given database that match a regular expression: shell> mysqlhotcopy db_name./regex/ The regular expression for the table name can be negated by prefixing it with a tilde (‘~’): shell> mysqlhotcopy db_name./~regex/ " I want to backup all my tables except two -'rtt' and 'expirations'. I use /usr/local/bin/mysqlhotcopy -p mypass --allowold mydb./~expirations/~rtt/ /var/backups/mysqlbackup/$1 However for some reason mysqlhotcopy do NOT skip tables 'rtt' and 'expirations'. Please give me an idea what is wrong. Thanks :-)) Kind regards, -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQLHotCopy Error
Stephen P. Fracek, Jr. wrote: We're having a problem with MySQLHotCopy. It has worked flawlessly in the past but now we're getting an error message similar to this: Dumping database... DBD::mysql::db do failed: Can't find file: './file.frm' (errno: 24) at /usr/local/mysql/bin/mysqlhotcopy line 468. Deleting previous 'old' hotcopy directory ('mydirectory') Existing hotcopy directory renamed to '/mydirectory/db_name_old' done. $ perror 24 Error code 24: Too many open files Try increasing your open_files_limit? This is documented here: http://dev.mysql.com/doc/mysql/en/not-enough-file-handles.html If this does not help, and you need further support, you could work this up with MySQL Support at: https://support.mysql.com Regards, Josh -- Josh Chamas Director, Professional Services MySQL Inc., www.mysql.com Get More with MySQL! www.mysql.com/consulting -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Mysqlhotcopy.
Hello. See: http://dev.mysql.com/doc/mysql/en/problems-with-character-sets.html Miguel Burgos O. wrote: > I install the last version of mysql and got this > > $mysqlhotcopy test > File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2) > > What happened ? > > Best regards, > Miguel > > --- > E-mail: [EMAIL PROTECTED] > > > > . > ADVERTENCIA: La informacion contenida en esta transmision, > y en cualquier archivo adjunto, es confidencial y no puede > ser usada o difundida por personas distintas de su o sus > destinatarios. Si usted ha recibido esta transmision por > error, por favor notifique inmediatamente al remitente > respondiendo por este mismo medio y eliminela de su sistema. > DICTUC no se hara responsable de la exactitud y veracidad de > la informacion contenida en este mensaje, asi como de su > modificacion, copia, divulgacion o reenvio, total o parcial. > Su uso no autorizado puede ser sancionado de conformidad con > la legislacion nacional. DICTUC transmite sus informaciones > oficiales a traves de su pagina en internet: http://www.dictuc.cl > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy
Jeff McKeon wrote: Am I right in assuming that while mysqlhotcopy is running, nobody else can write to or update the DB? Yes. That's why it's better to run it on a slave. -- Keith Ivey <[EMAIL PROTECTED]> Smokefree DC http://www.smokefreedc.org Washington, DC -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy
Yep. - Original Message - From: "Jeff McKeon" <[EMAIL PROTECTED]> To: "Jeremiah Gowdy" <[EMAIL PROTECTED]>; Sent: Friday, June 03, 2005 12:11 PM Subject: RE: mysqlhotcopy Am I right in assuming that while mysqlhotcopy is running, nobody else can write to or update the DB? Jeff -Original Message- From: Jeremiah Gowdy [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 2:24 PM To: Jeff McKeon; mysql@lists.mysql.com Subject: Re: mysqlhotcopy I run 24/7 applications also. Use mysqlhotcopy to do exactly what you're doing by hand now. Run mysqlhotcopy on a slave server. It does exactly what you think. Lock and flush the tables, tarball them, and unlock them. No shutdown required. - Original Message - From: "Jeff McKeon" <[EMAIL PROTECTED]> To: Sent: Friday, June 03, 2005 11:11 AM Subject: mysqlhotcopy Hello, Anyone here run mysqlhotcopy? I've read the docs on it but they are basicly just a howto and don't go too in depth. I've got a DB that is the back end to a 24/7 application. I ususally do backups from a replicated db by shutting down the Replicated DB then doing a tar are all the db files, then starting the db when done. Does mysqlhotcopy allow you to take a full snapshot of the db without needing to shut it down? What happens to read writes and updates while mysqlhotcopy is running? Any info or experiences anyone has would be greatly appreciated. Thanks, Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysqlhotcopy
Am I right in assuming that while mysqlhotcopy is running, nobody else can write to or update the DB? Jeff > -Original Message- > From: Jeremiah Gowdy [mailto:[EMAIL PROTECTED] > Sent: Friday, June 03, 2005 2:24 PM > To: Jeff McKeon; mysql@lists.mysql.com > Subject: Re: mysqlhotcopy > > > I run 24/7 applications also. Use mysqlhotcopy to do exactly > what you're > doing by hand now. Run mysqlhotcopy on a slave server. It > does exactly > what you think. Lock and flush the tables, tarball them, and > unlock them. > No shutdown required. > > - Original Message - > From: "Jeff McKeon" <[EMAIL PROTECTED]> > To: > Sent: Friday, June 03, 2005 11:11 AM > Subject: mysqlhotcopy > > > Hello, > > Anyone here run mysqlhotcopy? I've read the docs on it but > they are basicly just a howto and don't go too in depth. > I've got a DB that is the back end to a 24/7 application. I > ususally do backups from a replicated db by shutting down the > Replicated DB then doing a tar are all the db files, then > starting the db when done. Does mysqlhotcopy allow you to > take a full snapshot of the db without needing to shut it > down? What happens to read writes and updates while > mysqlhotcopy is running? > > Any info or experiences anyone has would be greatly appreciated. > > Thanks, > > Jeff > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy
I run 24/7 applications also. Use mysqlhotcopy to do exactly what you're doing by hand now. Run mysqlhotcopy on a slave server. It does exactly what you think. Lock and flush the tables, tarball them, and unlock them. No shutdown required. - Original Message - From: "Jeff McKeon" <[EMAIL PROTECTED]> To: Sent: Friday, June 03, 2005 11:11 AM Subject: mysqlhotcopy Hello, Anyone here run mysqlhotcopy? I've read the docs on it but they are basicly just a howto and don't go too in depth. I've got a DB that is the back end to a 24/7 application. I ususally do backups from a replicated db by shutting down the Replicated DB then doing a tar are all the db files, then starting the db when done. Does mysqlhotcopy allow you to take a full snapshot of the db without needing to shut it down? What happens to read writes and updates while mysqlhotcopy is running? Any info or experiences anyone has would be greatly appreciated. Thanks, Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: mysqlhotcopy -- max number of tables
Can you send the error message? It might be a timeout problem which is a mySQL configuration issue. (Look at wait_timeout in my.cnf) > -Original Message- > From: Andrew Loughe [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 31, 2004 10:30 AM > To: [EMAIL PROTECTED] > Subject: mysqlhotcopy -- max number of tables > > The mysqlhotcopy perl script is failing fail when I try to back up > a database containing more than about 600 tables. The script appears > to be unable to lock that many tables before making the actual copy. > > Have others experienced this same problem? > > Is this a limitation of DBI, or of MySQL 3.23.58? > > Is there a known work-around? > > Thanks for any help! > > > [ MySQL 3.23.58 , MyISAM tables, RH linux ] > > > -- > Andrew Loughe = > NOAA/OAR/FSL/AD R/FS5 | email: [EMAIL PROTECTED] > 325 Broadway | wwweb: www-ad.fsl.noaa.gov/users/loughe > Boulder, CO 80305-3328 | phone: 303-497-6211 fax: 303-497-6301 > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Mysqlhotcopy and incorrect database name error - We must be dense
I mean look at the --suffix - Dathan Vance Pattishall - Sr. Programmer and mySQL DBA for FriendFinder Inc. - http://friendfinder.com/go/p40688 -->-Original Message- -->From: Dathan Vance Pattishall [mailto:[EMAIL PROTECTED] -->Sent: Monday, September 22, 2003 1:26 PM -->To: 'Gilmore, Jason'; [EMAIL PROTECTED] -->Subject: RE: Mysqlhotcopy and incorrect database name error - We must be -->dense --> -->Your not using mysqlhotcopy correctly. --> -->/usr/bin/mysqlhotcopy db_name[./table_regex/] [new_db_name | directory] --> --> -->The problem is this -->mysqlhotcopy -u root --suffix=091703 staff /backups -->look at -u --> --> -->here is a format from inside mysqlhotcopy --> -->mysqlhotcopy --method='scp -Bq -i /usr/home/foo/.ssh/identity' -->--user=root --password=secretpassword \ --> db_1./^nice_table/ [EMAIL PROTECTED]:~/path/to/new_directory --> --> --> --> -->- Dathan Vance Pattishall --> - Sr. Programmer and mySQL DBA for FriendFinder Inc. --> - http://friendfinder.com/go/p40688 --> --> -->-->-Original Message- -->-->From: Gilmore, Jason [mailto:[EMAIL PROTECTED] -->-->Sent: Monday, September 22, 2003 4:35 AM -->-->To: [EMAIL PROTECTED] -->-->Subject: FW: Mysqlhotcopy and incorrect database name error - We must -->be -->-->dense -->--> -->-->Good morning, -->--> -->-->We're still battling with this; haven't heard back from anyone on the -->-->list... Resending one more time in the hopes that it catches -->somebody's -->-->eye. -->--> -->-->Thanks so much, -->-->Jason -->--> -->-->-Original Message- -->-->From: Gilmore, Jason -->-->Sent: Wednesday, September 17, 2003 1:36 PM -->-->To: [EMAIL PROTECTED] -->-->Subject: Mysqlhotcopy and incorrect database name error - We must be -->-->dense -->--> -->--> -->-->Hi there, -->--> -->-->A mysqlhotcopy issue has stumped no less than three of us here today -->at -->-->work, ensuring that the solution is glaringly obvious. We're trying -->to -->-->use mysqlhotcopy to copy a few databases. We want to make a local -->copy, -->-->nothing exotic, just want to move the database backups to the -->directory -->-->/backups/. -->--> -->-->In particular, we're attempting to make use of the following syntax: -->--> -->-->mysqlhotcopy db_name [/path/to/new_directory] -->--> -->-->However, we receive an error when executing the following: -->--> -->-->%> -->--> -->-->The error is: -->-->"DBI -->-->connect('../backups/wjgilmore/;host=localhost;mysql_read_default_g rou -->p=m -->-->ysqlhotcopy','root',...) failed: Incorrect database name '/backups/' -->at -->-->./mysqlhotcopy line 747" -->--> -->-->In short, what's happening is that mysqlhotcopy thinks that /backups/ -->is -->-->a database that we'd like backed-up. Which, according to the -->following -->-->syntax form (shown in the mysqlhotcopy page of the MySQL manual): -->--> -->-->mysqlhotcopy db_name_1 ... db_name_n /path/to/new_directory -->--> -->-->Interestingly, when using a regular expression, the destination -->-->directory is recognized immediately: -->--> -->-->%>mysqlhotcopy jan-2003./^sales/ /backups/ -->--> -->-->The Juicy details: -->-->* Redhat 7.2 -->-->* Perl 5.6.1 -->-->* Mysql 4.0.9-gamma (although we've tried mysqlhotcopy on three -->-->different mysql versions, with no luck) -->-->* Yes, the user has permission to write to /backups/ -->-->* Yes, the user has select and reload permissions. -->--> -->-->Thanks for any insight. This is driving all of us crazy. Also looked -->all -->-->over the newsgroups regarding this, a few individuals have posted -->-->similar questions, however none were answered. -->--> -->-->Best, -->-->Jason -->--> -->-->== -->-->Jason Gilmore -->-->Systems Developer -->-->The Fisher College of Business -->--> -->-->340 Mason Hall -->-->250 W. Woodruff Ave. -->-->Columbus, Ohio 43210 -->-->The Ohio State University -->--> -->-->e: [EMAIL PROTECTED] -->-->t: 614-292-9754 -->--> -->-->-- -->-->MySQL General Mailing List -->-->For list archives: http://lists.mysql.com/mysql -->-->To unsubscribe: -->-->http://lists.mysql.com/[EMAIL PROTECTED] -->--> -->--> -->-->-- -->-->MySQL General Mailing List -->-->For list archives: http://lists.mysql.com/mysql -->-->To unsubscribe: -->-->http://lists.mysql.com/[EMAIL PROTECTED] --> --> --> --> -->-- -->MySQL General Mailing List -->For list archives: http://lists.mysql.com/mysql -->To unsubscribe: -->http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Mysqlhotcopy and incorrect database name error - We must be dense
Your not using mysqlhotcopy correctly. /usr/bin/mysqlhotcopy db_name[./table_regex/] [new_db_name | directory] The problem is this mysqlhotcopy -u root --suffix=091703 staff /backups look at -u here is a format from inside mysqlhotcopy mysqlhotcopy --method='scp -Bq -i /usr/home/foo/.ssh/identity' --user=root --password=secretpassword \ db_1./^nice_table/ [EMAIL PROTECTED]:~/path/to/new_directory - Dathan Vance Pattishall - Sr. Programmer and mySQL DBA for FriendFinder Inc. - http://friendfinder.com/go/p40688 -->-Original Message- -->From: Gilmore, Jason [mailto:[EMAIL PROTECTED] -->Sent: Monday, September 22, 2003 4:35 AM -->To: [EMAIL PROTECTED] -->Subject: FW: Mysqlhotcopy and incorrect database name error - We must be -->dense --> -->Good morning, --> -->We're still battling with this; haven't heard back from anyone on the -->list... Resending one more time in the hopes that it catches somebody's -->eye. --> -->Thanks so much, -->Jason --> -->-Original Message- -->From: Gilmore, Jason -->Sent: Wednesday, September 17, 2003 1:36 PM -->To: [EMAIL PROTECTED] -->Subject: Mysqlhotcopy and incorrect database name error - We must be -->dense --> --> -->Hi there, --> -->A mysqlhotcopy issue has stumped no less than three of us here today at -->work, ensuring that the solution is glaringly obvious. We're trying to -->use mysqlhotcopy to copy a few databases. We want to make a local copy, -->nothing exotic, just want to move the database backups to the directory -->/backups/. --> -->In particular, we're attempting to make use of the following syntax: --> -->mysqlhotcopy db_name [/path/to/new_directory] --> -->However, we receive an error when executing the following: --> -->%> --> -->The error is: -->"DBI -->connect('../backups/wjgilmore/;host=localhost;mysql_read_default_grou p=m -->ysqlhotcopy','root',...) failed: Incorrect database name '/backups/' at -->./mysqlhotcopy line 747" --> -->In short, what's happening is that mysqlhotcopy thinks that /backups/ is -->a database that we'd like backed-up. Which, according to the following -->syntax form (shown in the mysqlhotcopy page of the MySQL manual): --> -->mysqlhotcopy db_name_1 ... db_name_n /path/to/new_directory --> -->Interestingly, when using a regular expression, the destination -->directory is recognized immediately: --> -->%>mysqlhotcopy jan-2003./^sales/ /backups/ --> -->The Juicy details: -->* Redhat 7.2 -->* Perl 5.6.1 -->* Mysql 4.0.9-gamma (although we've tried mysqlhotcopy on three -->different mysql versions, with no luck) -->* Yes, the user has permission to write to /backups/ -->* Yes, the user has select and reload permissions. --> -->Thanks for any insight. This is driving all of us crazy. Also looked all -->over the newsgroups regarding this, a few individuals have posted -->similar questions, however none were answered. --> -->Best, -->Jason --> -->== -->Jason Gilmore -->Systems Developer -->The Fisher College of Business --> -->340 Mason Hall -->250 W. Woodruff Ave. -->Columbus, Ohio 43210 -->The Ohio State University --> -->e: [EMAIL PROTECTED] -->t: 614-292-9754 --> -->-- -->MySQL General Mailing List -->For list archives: http://lists.mysql.com/mysql -->To unsubscribe: -->http://lists.mysql.com/[EMAIL PROTECTED] --> --> -->-- -->MySQL General Mailing List -->For list archives: http://lists.mysql.com/mysql -->To unsubscribe: -->http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Mysqlhotcopy and incorrect database name error - We must be dense
"Gilmore, Jason" <[EMAIL PROTECTED]> wrote: > > A mysqlhotcopy issue has stumped no less than three of us here today at > work, ensuring that the solution is glaringly obvious. We're trying to > use mysqlhotcopy to copy a few databases. We want to make a local copy, > nothing exotic, just want to move the database backups to the directory > /backups/. > > In particular, we're attempting to make use of the following syntax: > > mysqlhotcopy db_name [/path/to/new_directory] > > However, we receive an error when executing the following: > > %>mysqlhotcopy -u root --suffix=091703 staff /backups If you use --suffix option you should not specify location, because in this case mysqlhotcopy create a new database, f.e. staff091703, in the MySQL data dir. That is why you get "incorrect database name" error. > > The error is: > "DBI > connect('../backups/wjgilmore/;host=localhost;mysql_read_default_group=m > ysqlhotcopy','root',...) failed: Incorrect database name '/backups/' at > ./mysqlhotcopy line 747" > > In short, what's happening is that mysqlhotcopy thinks that /backups/ is > a database that we'd like backed-up. Which, according to the following > syntax form (shown in the mysqlhotcopy page of the MySQL manual): > > mysqlhotcopy db_name_1 ... db_name_n /path/to/new_directory > > Interestingly, when using a regular expression, the destination > directory is recognized immediately: > > %>mysqlhotcopy jan-2003./^sales/ /backups/ > > The Juicy details: > * Redhat 7.2 > * Perl 5.6.1 > * Mysql 4.0.9-gamma (although we've tried mysqlhotcopy on three > different mysql versions, with no luck) > * Yes, the user has permission to write to /backups/ > * Yes, the user has select and reload permissions. > > Thanks for any insight. This is driving all of us crazy. Also looked all > over the newsgroups regarding this, a few individuals have posted > similar questions, however none were answered. > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
re: mysqlhotcopy
I'm running mySql 3.23 on OS X 10.2 and I've reached a bit of an impassse with mysqlhotcopy, after having to re=install dbd and dbi, I keep getting the error: DBD::mysql::db do failed: You have an error in your SQL syntax near '` READ, `trypanofan`.``construct`` READ, `trypanofan`.``dapi`` READ, `trypanofan' at line 1 at /usr/bin/mysqlhotcopy line 438. there appears to be a workaround in the manual (http://www.mysql.com/doc/en/mysqlhotcopy.html) which indicates it's the method of quotation and suggests modifying 'quote_names' - unfortunately I have no idea where 'quote_names' is or where it's supposed to be. any suggestions would be lovely... thanks -s -- __ Seth Redmond DNA resource and Database Curator Wellcome Trust Laboratories for Molecular Parasitology Department of Biological Sciences Imperial College London SW7 2AZ [EMAIL PROTECTED] __ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy problem
On Wed, 2003-07-30 at 17:40, Vladimir Shiray wrote: > > How can I make hotcopy of my database if it have many tables (more than 1000) ??? > mysqlhotcopy failed when it try to lock all tables ... > > How many tables can I lock at one time ? > Can I increase this limit ? > Hi, You probably ran out of file handles. The available file handles can be increased by modifying the table_cache and max_connections variables in my.cnf, eg. set-variable = table_cache=3000 You might need to tinker with /proc/sys/fs/file-max if you hit your operating system's hard limit. regards, Martin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy on innoDB
"Moritz Steiner" <[EMAIL PROTECTED]> wrote: > > Does mysqlhotcopy work with innoDB? I only get it to work with MyISAM > tables... For innoDB only the structure is saved but not the data > mysqlhotcopy works only with ISAM/MyISAM tables. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy / bin-log manipulation
# [EMAIL PROTECTED] / 2003-06-27 14:44:55 +0200: > I have a question regarding mysqlhotcopy's use. > I'd like to use the --flushlog option in order to have a nice backup & > synchronized log for my replication slave in case of recover need > (without stopping the master). > But the lock used by mysqlhotcopy made me split the backups into > something like: > > mysqlhotcopy db_name_1 db_name_2 > mysqlhotcopy db_name_3 db_name_4 db_name 5 > mysqlhotcopy db_name_6 > > (that way because the backup of db_name_1 and db_name_2 is fast and I > don't want these table to be locked a long time (a few sec. max), and > the backup of db_name_6 is long (~2-3mn) but it supports the lock). why don't you just cron mysqladmin flush-logs ? the binlog is a complete backup AFAICT. > So if I flush the logs each time, not only I'll may have little pieces > of logs, but I can't see how to use these to recover a slave. I don't use replication yet, sorry. > I was thinking to filter these little log files in order to rewrite a > correct one but is it possible to do the inverse of the mysqlbinlog command? Why would you want to do anything like that? -- If you cc me or remove the list(s) completely I'll most likely ignore your message.see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy generates a segmentation fault
On Wed, 2003-06-11 at 01:55, Danny Cron wrote: > I have three boxes. Mysqlhotcopy works on box1, but it generates a > segmentation fault on box2 and box3. I want it to work on all boxes. > I am prepared to upgrade them all to the level of box3 (but > mysqlhotcopy doesn't work with that configuration). Does anyone know > of a solution? > Hi, I have had the same problem running mysqlhotcopy on the MySQL installed with Woody. I think there is some problem with the client library while it tries to parse the my.cnf file causing a segmentation fault. I'm not sure if the problem is inside DBI or the MySQL libs. A quick solution is to remove the "mysql_read_default_group=mysqlhotcopy" clause from the connection string: my $dbh = DBI->connect("dbi:mysql:$dsn;mysql_read_default_group=mysqlhotcopy", $opt{user}, $opt{password}, { RaiseError => 1, PrintError => 0, AutoCommit => 1, }); becomes: my $dbh = DBI->connect("dbi:mysql:$dsn", $opt{user}, $opt{password}, { RaiseError => 1, PrintError => 0, AutoCommit => 1, }); This loses the ability to use dedicated mysqlhotcopy sections in your config file, but at least gets around the segfault. regards, Martin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Question / suggestion re: mysqlhotcopy
Thanks Paul! Much appreciated. I'm sure this will be of help to others, particularly because to WinXP Perl neophytes like myself, you only get to find out mysqlhotcopy.pl won't work because of the "getpwuid" function after you go through solving how to get DBI.pm installed (which turned out to be relatively easy by PPM, of course, but finding THAT out wasn't 2nd-nature to a newbie like myself), because that's what falls over first, since it doesn't seem to be distributed with the ActiveState Perl 5.8 package. So, laugh, you fix that only to find you can't fix the next problem... Thanks again! Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, one snide comment at a time... -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Saturday, 7 June 2003 10:54 AM To: Murray Wells; [EMAIL PROTECTED] Subject: Re: Question / suggestion re: mysqlhotcopy At 10:34 +1000 6/7/03, Murray Wells wrote: >Hi All, > >Apologies if this has been done to death previously, but would it be >sensible to indicate in the MySQL documentation that the Perl >mysqlhotcopy script only appears to work on the Linux platform? (Or, >more accurately, doesn't work on the WinXP platform, I have no idea >about other platforms) Done. > >At least, so it appears when attempting to get it to work on WinXP >using ActiveState Perl 5.8. It appears the "getpwuid" function is >unsupported in the Win32 implementation. > >Alternatively, if there's a known work-around, I'd love to hear about >it, and maybe that should go into the documentation instead? > >Much warmth, > >Murray >http://www.planetthoughtful.org >Building a thoughtful planet, >one snide comment at a time... -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Question / suggestion re: mysqlhotcopy
At 10:34 +1000 6/7/03, Murray Wells wrote: Hi All, Apologies if this has been done to death previously, but would it be sensible to indicate in the MySQL documentation that the Perl mysqlhotcopy script only appears to work on the Linux platform? (Or, more accurately, doesn't work on the WinXP platform, I have no idea about other platforms) Done. At least, so it appears when attempting to get it to work on WinXP using ActiveState Perl 5.8. It appears the "getpwuid" function is unsupported in the Win32 implementation. Alternatively, if there's a known work-around, I'd love to hear about it, and maybe that should go into the documentation instead? Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, one snide comment at a time... -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Question / suggestion re: mysqlhotcopy
Hi All, Apologies if this has been done to death previously, but would it be sensible to indicate in the MySQL documentation that the Perl mysqlhotcopy script only appears to work on the Linux platform? (Or, more accurately, doesn't work on the WinXP platform, I have no idea about other platforms) At least, so it appears when attempting to get it to work on WinXP using ActiveState Perl 5.8. It appears the "getpwuid" function is unsupported in the Win32 implementation. Alternatively, if there's a known work-around, I'd love to hear about it, and maybe that should go into the documentation instead? Much warmth, Murray http://www.planetthoughtful.org Building a thoughtful planet, one snide comment at a time... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy usage
"Nils Valentin" <[EMAIL PROTECTED]> wrote: > Does anybody know detailed how mysqlhotcopy works ? > > Does it put a lock on the table or only on a row in case of transaction safe > tables ? It uses LOCK TABLES statement, so it locks the whole table. > Does it work with any table type (Innodb,BDB, Merge, MyISAM) ? Nope. Only for ISAM/MyISAM tables. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Mysqlhotcopy and reuilding indexes
> -Original Message- > From: Harald Fuchs [mailto:[EMAIL PROTECTED]] > Sent: 28. januar 2003 10:46 > To: [EMAIL PROTECTED] > Subject: Re: Mysqlhotcopy and reuilding indexes > > > In article <[EMAIL PROTECTED]>, > Erlend Hopsø Strømsvik <[EMAIL PROTECTED]> writes: > > > Hi > > Sorry if I'm just being feeble minded here but I can't get > this to work. > > > First I take a copy of my database using: > > mysqlhotcopy --allowold --noindices db_name /path/path > > > using the '--noindices' since it says > > "--noindices > > Don't include full index files in copy to make the backup > smaller and faster > > The indexes can later be reconstructed with myisamchk -rq.. " > > in the manual. > > > But I can't for the life of me figure out how to restore > the index files > > with myisamchk. All I get is "myisamchk: error: > 'blabla.MYD' is not a > > MyISAM-table" or "myisamchk: error: 'blabla.frm' is not a > MyISAM-table". > > Just omit the suffix: myisamchk -rq dbdir/blabla > I'm pretty sure I tried that... "myisamchk: error: File 'plassering' doesn't exist" is what I get when trying to run it without the suffix. But from the documentation I found this: http://www.mysql.com/doc/en/REPAIR_TABLE.html "As of MySQL 4.0.2, there is a USE_FRM mode for REPAIR. Use it if the `.MYI' file is missing or if its header is corrupted. In this mode MySQL will recreate the table, using information from the `.frm' file. This kind of repair cannot be done with myisamchk." So from MySQL 4.0.2 you can't do this with 'myisamchk'. So next time I should include information about which version of MySQL I'm running too *hangs head in shame* Allthough this -could- have been noted in the docs! Maybe there should be a change in the documentation at the mysqlhotcopy page soon then since a lot of people are starting to use MySQL 4.x.x: http://www.mysql.com/doc/en/mysqlhotcopy.html "--noindices Don't include full index files in copy to make the backup smaller and faster The indexes can later be reconstructed with myisamchk -rq.. " - 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
RE: mysqlhotcopy
Why is mysqldump grossly inefficient. I thought this was the standard to backing up a mysql database. I use dump / restore to back up my hard drive. Would this be a better option to do a separate dump on the mysql database? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 9:14 AM To: [EMAIL PROTECTED] Subject: mysqlhotcopy I am trying to find the best way to backup my 4.7GB database and have unfortunately found out the hard way that mysqldump is grossly inefficient. Since 4 web sites rely on the data, shutting it down to copy it is not a good option either. Has anyone used mysqlhotcopy? The perl doc says it is still in beta, which makes me a little nervous. Thanks in advance! -- Ed Pauley II Bloodstock Research Information Services Phone: (859) 223- ext. 297 E-mail: [EMAIL PROTECTED] Web:http://www.brisnet.com - 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
Re: mysqlhotcopy??
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On Tue, Dec 10, 2002 at 11:04:01AM -0500, [EMAIL PROTECTED] wrote: > > I am trying to find the best way to backup my 4.7GB > database and have unfortunately found out the hard way > that mysqldump is grossly inefficient. Since 4 web sites > rely on the data, shutting it down to copy it is not a > good option either. Has anyone used mysqlhotcopy? The perl > doc says it is still in beta, which makes me a little > nervous. have you thought about lvm? http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html - -- Peter Abplanalp -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE99hcZggA8sH0iRXQRAjFiAJ4tCyxvTYppnhf6Eyw0TwyyGwYtrwCbBNG9 R6A3wtPfCBOF/nf1Z2NzETo= =tefX -END PGP SIGNATURE- - 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
Re: mysqlhotcopy point-in-time recovery
Michael, Jeremy, - Original Message - From: "Jeremy Zawodny" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Wednesday, November 13, 2002 9:21 PM Subject: Re: mysqlhotcopy point-in-time recovery > On Wed, Nov 13, 2002 at 01:18:18PM -0500, Michael T. Babcock wrote: > > Jeremy Zawodny wrote: > > > > >Well, it handles ISAM, MyISAM, and BDB (last I checked). So what > > >should it be called? mysql_isam_myisam_bdb_hotcopy? > > > > > > > > > > Heheh, point taken. It seems simply unfortunate that the program in > > question doesn't work with exactly one table type (Gemini as well > > perhaps?). A notice on the help screen (at the command-line & man page) > > stating table type compatibility would be most helpful though, since it > > simply says "db_name", not "db_name must be MyISAM, ISAM or BDB." > > Thoughts? I do not know if for BDB tables the copy is transaction-consistent. I mean, can there be uncommitted transactions in the image which the mysqlhotcopy program makes of the database? Then also the BDB log files should be copied, but what happens if there is activity in other BDB databases at the same time? > Yeah, the docs should be made more clear. A patch is in order. > -- > Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! Best regards, Heikki Tuuri Innobase Oy --- InnoDB - transactions, row level locking, and foreign key support for MySQL See http://www.innodb.com, download MySQL-Max from http://www.mysql.com > <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ > > MySQL 3.23.51: up 99 days, processed 2,101,971,725 queries (244/sec. avg) - 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
Re: mysqlhotcopy point-in-time recovery
On Wed, Nov 13, 2002 at 01:18:18PM -0500, Michael T. Babcock wrote: > Jeremy Zawodny wrote: > > >Well, it handles ISAM, MyISAM, and BDB (last I checked). So what > >should it be called? mysql_isam_myisam_bdb_hotcopy? > > > > > > Heheh, point taken. It seems simply unfortunate that the program in > question doesn't work with exactly one table type (Gemini as well > perhaps?). A notice on the help screen (at the command-line & man page) > stating table type compatibility would be most helpful though, since it > simply says "db_name", not "db_name must be MyISAM, ISAM or BDB." > > Thoughts? Yeah, the docs should be made more clear. A patch is in order. -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ MySQL 3.23.51: up 99 days, processed 2,101,971,725 queries (244/sec. avg) - 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
RE: mysqlhotcopy point-in-time recovery
Michael I have a nice perl program I wrote that I use to dump from MySql to a tab delimited ASCII file. I would pass it along if you think it would help... ~Kelly W. Black -Original Message- From: Michael T. Babcock [mailto:mbabcock@;fibrespeed.net] Sent: Monday, November 11, 2002 2:38 PM To: Heikki Tuuri Cc: [EMAIL PROTECTED] Subject: Re: mysqlhotcopy point-in-time recovery Heikki Tuuri wrote: >you cannot use mysqlhotcopy to back up InnoDB type tables. Only the .frm >files are in the database directory, while the data is in ibdata files. >mysqlhotcopy does not copy ibdata files or ib_logfiles, and if it would do >that, the copies could be corrupt because of writes the database meanwhile >does to these files. > > Shouldn't it be renamed to myisamhotcopy then? ... if it doesn't work with MySQL as a whole, the tool should be renamed. Plus, a tool that does in fact work with MySQL as a whole would be nice. SQL, QUERY -- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock - 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
Re: mysqlhotcopy point-in-time recovery
Heikki Tuuri wrote: you cannot use mysqlhotcopy to back up InnoDB type tables. Only the .frm files are in the database directory, while the data is in ibdata files. mysqlhotcopy does not copy ibdata files or ib_logfiles, and if it would do that, the copies could be corrupt because of writes the database meanwhile does to these files. Shouldn't it be renamed to myisamhotcopy then? ... if it doesn't work with MySQL as a whole, the tool should be renamed. Plus, a tool that does in fact work with MySQL as a whole would be nice. SQL, QUERY -- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock - 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
Re: mysqlhotcopy point-in-time recovery
Jing, - Original Message - From: ""Jannie Qu"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Monday, November 11, 2002 8:03 PM Subject: mysqlhotcopy point-in-time recovery > Hi, all, > > sql, query. > > I use mysqlhotcopy to backup innodb tables and I tried to find how to > recovery database point-in-time with the help of binary log. > > I had tried "mysqlbinlog --user-jqu --password=1234 Host-bin.[0-9]* | mysql" > without success. > > Anyone of you know how to recovery database point-in-time? you cannot use mysqlhotcopy to back up InnoDB type tables. Only the .frm files are in the database directory, while the data is in ibdata files. mysqlhotcopy does not copy ibdata files or ib_logfiles, and if it would do that, the copies could be corrupt because of writes the database meanwhile does to these files. " 4.8.6 mysqlhotcopy, Copying MySQL Databases and Tables mysqlhotcopy is a Perl script that uses LOCK TABLES, FLUSH TABLES and cp or scp to quickly make a backup of a database. It's the fastest way to make a backup of the database or single tables, but it can only be run on the same machine where the database directories are. " The way to backup InnoDB tables is to use mysqldump, or InnoDB Hot Backup (a non-free tool). Hot Backup prints the binlog offset corresponding to the backup, and you can do a point-in-time recovery using the binlog files as explained at http://www.innodb.com/hotbackup.html. I think there is currently no mechanism to know what is the binlog offset of a dump taken with mysqldump. Blocking all activity in the server with table level locks is a way to force some binlog offset to your dumps. > Thank you, > Jing Best regards, Heikki Tuuri Innobase Oy --- InnoDB - transactions, hot backup, and foreign key support for MySQL See http://www.innodb.com, download MySQL-Max from http://www.mysql.com sql query - 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
Re: mysqlhotcopy problem - Segmentation fault
Yes, both run 3.23.49a - Original Message - From: "Jeremy Zawodny" <[EMAIL PROTECTED]> To: "Mihail Manolov" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, August 29, 2002 3:24 AM Subject: Re: mysqlhotcopy problem - Segmentation fault > On Wed, Aug 28, 2002 at 04:50:22PM -0400, Mihail Manolov wrote: > > I have strange problem - I get Segmentation fault error when I am trying to > > execute mysqlhotcopy. > > > > When I remove the [mysqlhotcopy] section in my /etc/my.cnf > > configuration it works. Meanwhile, on another server it works just > > fine with the same configuration file. > > Do both servers have the same MySQL version installed? - 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
Re: mysqlhotcopy problem - Segmentation fault
On Wed, Aug 28, 2002 at 04:50:22PM -0400, Mihail Manolov wrote: > I have strange problem - I get Segmentation fault error when I am trying to > execute mysqlhotcopy. > > When I remove the [mysqlhotcopy] section in my /etc/my.cnf > configuration it works. Meanwhile, on another server it works just > fine with the same configuration file. Do both servers have the same MySQL version installed? -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ MySQL 3.23.51: up 22 days, processed 469,104,809 queries (236/sec. avg) - 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
Re: mysqlhotcopy regexp problem with 640 and more Databases
In the last episode (Jun 05), Pabst Simon said: > Description: > > When using mysqlhotcopy 1.15 for database backups with --regexp='.*' and > having 640 or more Databases produces the following error: > > DBD::mysql::db do failed: File '/lvol1/mysql/data/mydatabase/mytable640.MYD' not >found (Errcode: 24) at ./bin/mysqlhotcopy line 432. And did you run "perror 24" to find out why the OS wouldn't let mysql open the file? $ perror 24 Error code 24: Too many open files $ Make sure the OS is configured to let mysql open lots and lots of files at once. -- Dan Nelson [EMAIL PROTECTED] - 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
Re: mysqlhotcopy
On Tue, 2002-03-26 at 07:24, Hans Kind wrote: > Dear Martin, > > I tried that option, but it returns a errono 24: > > ../bin/mysqlhotcopy -u username -p password --flushlog --allowold > --regexp='.*' /d1/terminal-a/mysql/ > 'mail' is an empty database > 'opt' is an empty database > 'oveas' is an empty database > DBD::mysql::db do failed: Can't find file: > './alternat/nuke_bannerfinish.frm' (errno: 24) at ../bin/mysqlhotcopy line 434. > > It creates the directories, but doesn't backup any of the tables. > > In the archives I found similar reports, but it was mentioned the problem > was fixed!. > > Not sure how this errono 24 (Error code 24: Too many open files) relates > to this problem. > [snip] Maybe there are too many open files. How many tables are there in the set of databases you're trying to back up ? I think the error is being thrown when attempting to lock all the tables before the copy. I don't know how mysql locks tables, but if it use flock (or equivalent) that may open one or more files per table. If you have several thousand tables - that may exceed you OS limits. What gets displayed when you run mysqlhotcopy with the '--debug' ( and maybe the '--dryrun' ) flags ? regards, Martin - 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
Re: mysqlhotcopy
Dear Martin, I tried that option, but it returns a errono 24: ../bin/mysqlhotcopy -u username -p password --flushlog --allowold --regexp='.*' /d1/terminal-a/mysql/ 'mail' is an empty database 'opt' is an empty database 'oveas' is an empty database DBD::mysql::db do failed: Can't find file: './alternat/nuke_bannerfinish.frm' (errno: 24) at ../bin/mysqlhotcopy line 434. It creates the directories, but doesn't backup any of the tables. In the archives I found similar reports, but it was mentioned the problem was fixed!. Not sure how this errono 24 (Error code 24: Too many open files) relates to this problem. rgds Hans At 09:19 25-3-2002 +, you wrote: >On Sat, 2002-03-23 at 15:19, Hans Kind wrote: > > Hi, > > > > What is the correct syntax to use to backup all databases in the > > /usr/local/mysql/var directory. > > > > We tried a number of different options, but at best we get only 1 > database, > > backup completely. Using a wildcard, *, only creates the directory, but > > doesn't copy the tables. > > >[snip] > >Hi, > >mysqlhotcopy has a regexp argument which makes it backup all databases >matching the regexp. The regexp uses perl regexp syntax, not shell >wildcards: > >So: > > mysqlhotcopy --regexp='.*' > >backs up all databases, whereas: > > mysqlhotcopy --regexp='*' > >isn't a correct regexp. > >regards, >Martin - 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
Re: mysqlhotcopy
On Sat, 2002-03-23 at 15:19, Hans Kind wrote: > Hi, > > What is the correct syntax to use to backup all databases in the > /usr/local/mysql/var directory. > > We tried a number of different options, but at best we get only 1 database, > backup completely. Using a wildcard, *, only creates the directory, but > doesn't copy the tables. > [snip] Hi, mysqlhotcopy has a regexp argument which makes it backup all databases matching the regexp. The regexp uses perl regexp syntax, not shell wildcards: So: mysqlhotcopy --regexp='.*' backs up all databases, whereas: mysqlhotcopy --regexp='*' isn't a correct regexp. regards, Martin - 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
Re: mysqlhotcopy: doesn't copy tables ??
Check ownership and permissions of MyDatabase_copy directory (and maybe the files). On Wed, 2002-03-20 at 02:01, Ashwin Kotian wrote: > I'm using the following syntax to backup one of my Mysql databses using > mysqlhotcopy: > > #/usr/bin/mysqlhotcopy --allowold MyDatabase MyDatabase_copy > > There is no error message & there is no difference between the two > folders /var/lib/mysql/MyDatabase & /var/lib/mysql/MyDatabase_copy when > I do a diff on them. > I can connect to the "MyDatabase_Copy" database. However, I'm unable to > list any tables on the backedup database "MyDatabase_copy". > What could be the problem here? > Is there something else I'm missing here that I'm supposed to do? Anybody ? > > Thanks, > > Ashwin. > > > - > 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 > -- dsoares (sql) - 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
Re: mysqlhotcopy in 4.0.1
On Mon, 2002-02-11 at 02:04, Jeremy Zawodny wrote: > On Mon, Feb 11, 2002 at 03:04:47PM +1300, Ian Collins wrote: > > In mysqlhotcopy, function copy_files, there is a line, > > > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > > > (dont you just love perl?). > > > > If the database name in question is, for example, testone_750, a > > perfectly legal database name (??), then no files get copied! and > > the mysqlhotcopy fails. > > That's bad. > > > I presume (again ??) that the above line is trying to strip out all > > ../ matches. > > Actually it's trying to strip out every database name which contains > two digits in a row. That's clearly not ideal. We need something > more specific there. > [snip] What it should be doing is identifying every file which isn't in a two-digit sub-directory inside a database directory. It should read: my @non_raid = grep { ! m:/\d{2}/[^/]+$: } @$files; I've sent a patch to internals. == Martin - 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
RE: mysqlhotcopy in 4.0.1
OK. By the way - why is it trying to strip 2 digits in a row? I'm sure there was a reason. Cheers, Ian Collins. -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:05 PM To: Ian Collins Cc: Mysql (E-mail) Subject: Re: mysqlhotcopy in 4.0.1 On Mon, Feb 11, 2002 at 03:04:47PM +1300, Ian Collins wrote: > In mysqlhotcopy, function copy_files, there is a line, > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > (dont you just love perl?). > > If the database name in question is, for example, testone_750, a > perfectly legal database name (??), then no files get copied! and > the mysqlhotcopy fails. That's bad. > I presume (again ??) that the above line is trying to strip out all > ../ matches. Actually it's trying to strip out every database name which contains two digits in a row. That's clearly not ideal. We need something more specific there. > If so, then wouldn't { $_ !~ m:\.\./: } do just as well? Nope. > I changed the > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > to > > my @non_raid = grep { $_ !~ m:\.\./: } @$files; > > and it seemed to fix my problems. It'll fix your problem, but not THE problem. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 3 days, processed 121,642,679 queries (403/sec. avg) - 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
Re: mysqlhotcopy in 4.0.1
On Mon, Feb 11, 2002 at 03:04:47PM +1300, Ian Collins wrote: > In mysqlhotcopy, function copy_files, there is a line, > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > (dont you just love perl?). > > If the database name in question is, for example, testone_750, a > perfectly legal database name (??), then no files get copied! and > the mysqlhotcopy fails. That's bad. > I presume (again ??) that the above line is trying to strip out all > ../ matches. Actually it's trying to strip out every database name which contains two digits in a row. That's clearly not ideal. We need something more specific there. > If so, then wouldn't { $_ !~ m:\.\./: } do just as well? Nope. > I changed the > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > to > > my @non_raid = grep { $_ !~ m:\.\./: } @$files; > > and it seemed to fix my problems. It'll fix your problem, but not THE problem. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 3 days, processed 121,642,679 queries (403/sec. avg) - 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
RE: mysqlhotcopy in 4.0.1
OK. By the way - why is it trying to strip 2 digits in a row? I'm sure there was a reason. Cheers, Ian Collins. -Original Message- From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:05 PM To: Ian Collins Cc: Mysql (E-mail) Subject: Re: mysqlhotcopy in 4.0.1 On Mon, Feb 11, 2002 at 03:04:47PM +1300, Ian Collins wrote: > In mysqlhotcopy, function copy_files, there is a line, > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > (dont you just love perl?). > > If the database name in question is, for example, testone_750, a > perfectly legal database name (??), then no files get copied! and > the mysqlhotcopy fails. That's bad. > I presume (again ??) that the above line is trying to strip out all > ../ matches. Actually it's trying to strip out every database name which contains two digits in a row. That's clearly not ideal. We need something more specific there. > If so, then wouldn't { $_ !~ m:\.\./: } do just as well? Nope. > I changed the > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > to > > my @non_raid = grep { $_ !~ m:\.\./: } @$files; > > and it seemed to fix my problems. It'll fix your problem, but not THE problem. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 3 days, processed 121,642,679 queries (403/sec. avg) - 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
Re: mysqlhotcopy in 4.0.1
On Mon, Feb 11, 2002 at 03:04:47PM +1300, Ian Collins wrote: > In mysqlhotcopy, function copy_files, there is a line, > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > (dont you just love perl?). > > If the database name in question is, for example, testone_750, a > perfectly legal database name (??), then no files get copied! and > the mysqlhotcopy fails. That's bad. > I presume (again ??) that the above line is trying to strip out all > ../ matches. Actually it's trying to strip out every database name which contains two digits in a row. That's clearly not ideal. We need something more specific there. > If so, then wouldn't { $_ !~ m:\.\./: } do just as well? Nope. > I changed the > > my @non_raid = grep { $_ !~ m:\d\d/: } @$files; > > to > > my @non_raid = grep { $_ !~ m:\.\./: } @$files; > > and it seemed to fix my problems. It'll fix your problem, but not THE problem. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.47-max: up 3 days, processed 121,642,679 queries (403/sec. avg) - 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
Re: Mysqlhotcopy regexp problem
On Fri, Jul 20, 2001 at 01:25:22AM -0700, Jeremy Zawodny wrote: > > > > If I specify just one database, I still get the "deprecated" > > warning, but the hotcopy works... > > There are two bugs. > > (1) The "depricated" message. I'm submitting a patch for that. > > (2) The fact that if you specify no databases but do specify a > regexp, it doesn't do what you expect. It is unclear to me, > based on the docs for mysqlhotcopy, what it is supposed to do in > that case. But I'm leaning toward thinking that your > expectations are right. I'll put that in the patch as well. The patch against scripts/mysqlhotcopy.sh from the latest bitkeeper source tree is below my signature. I tested it using your example and it seemed to solve the problems for me. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 <-- NEW MySQL 3.23.29: up 34 days, processed 268,910,584 queries (89/sec. avg) --- mysqlhotcopy.sh.origFri Jul 20 00:51:17 2001 +++ mysqlhotcopy.sh Fri Jul 20 02:11:06 2001 @@ -223,18 +223,27 @@ my $db = $rdb->{src}; eval { $dbh->do( "use $db" ); }; die "Database '$db' not accessible: $@" if ( $@ ); -my @dbh_tables = $dbh->func( '_ListTables' ); +my @dbh_tables = $dbh->tables(); ## generate regex for tables/files -my $t_regex = $rdb->{t_regex};## assign temporary regex -my $negated = $t_regex =~ tr/~//d;## remove and count negation operator: we don't allow ~ in table names -$t_regex = qr/$t_regex/; ## make regex string from user regex - -## filter (out) tables specified in t_regex -print "Filtering tables with '$t_regex'\n" if $opt{debug}; -@dbh_tables = ( $negated - ? grep { $_ !~ $t_regex } @dbh_tables - : grep { $_ =~ $t_regex } @dbh_tables ); +my $t_regex; +my $negated; +if ($rdb->{t_regex}) { +$t_regex = $rdb->{t_regex};## assign temporary regex +$negated = $t_regex =~ tr/~//d;## remove and count + ## negation operator: we + ## don't allow ~ in table + ## names + +$t_regex = qr/$t_regex/; ## make regex string from + ## user regex + +## filter (out) tables specified in t_regex +print "Filtering tables with '$t_regex'\n" if $opt{debug}; +@dbh_tables = ( $negated +? grep { $_ !~ $t_regex } @dbh_tables +: grep { $_ =~ $t_regex } @dbh_tables ); +} ## get list of files to copy my $db_dir = "$datadir/$db"; @@ -249,10 +258,18 @@ closedir( DBDIR ); ## filter (out) files specified in t_regex -my @db_files = ( $negated - ? grep { $db_files{$_} !~ $t_regex } keys %db_files - : grep { $db_files{$_} =~ $t_regex } keys %db_files ); +my @db_files; +if ($rdb->{t_regex}) { +@db_files = ($negated + ? grep { $db_files{$_} !~ $t_regex } keys %db_files + : grep { $db_files{$_} =~ $t_regex } keys %db_files ); +} +else { +@db_files = keys %db_files; +} + @db_files = sort @db_files; + my @index_files=(); ## remove indices unless we're told to keep them @@ -808,4 +825,8 @@ Ask Bjoern Hansen - Cleanup code to fix a few bugs and enable -w again. Emil S. Hansen - Added resetslave and resetmaster. + +Jeremy D. Zawodny - Removed depricated DBI calls. Fixed bug which +resulted in nothing being copied when a regexp was specified but no +database name(s). - 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 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysqlhotcopy regexp problem
On Wed, Jul 18, 2001 at 09:57:00AM -0800, Chris Lott wrote: > > Using the mysqhotcopy that came with the most recent MySQL (3.23.39) > on a RedHat 7.1 box with perl 5.6.0, I am getting the following > errors when trying to back up all databases: > > mysqlhotcopy --password="foo" --allowold --regexp=".*" /usr/backups/ \ > > _ListTables is deprecated, use $dbh->tables() at > /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD/mysql.pm line 262. > Use of uninitialized value in transliteration (tr///) at > /usr/bin/mysqlhotcopy line 230. > Use of uninitialized value in regexp compilation at /usr/bin/mysqlhotcopy > line 231. > > If I specify just one database, I still get the "deprecated" > warning, but the hotcopy works... There are two bugs. (1) The "depricated" message. I'm submitting a patch for that. (2) The fact that if you specify no databases but do specify a regexp, it doesn't do what you expect. It is unclear to me, based on the docs for mysqlhotcopy, what it is supposed to do in that case. But I'm leaning toward thinking that your expectations are right. I'll put that in the patch as well. Thanks, Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 <-- NEW MySQL 3.23.29: up 33 days, processed 264,162,097 queries (89/sec. avg) - 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
Re: mysqlhotcopy ..
On Fri, Jun 01, 2001 at 03:35:57PM +0800, Alice wrote: > i have no idea on how to run mysqlhotcopy in the query tool or it is > not suppose to run in query tool. is this correct ? mysqlhotcopy > db_name '/downloads/backupDB/' It's a stand-alone tool. If you run it without any command-line arguments, it will give you usage information (like all good tools do). Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951 MySQL 3.23.29: up 7 days, processed 44,321,200 queries (72/sec. avg) - 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