backup: mysqldump or mysqlhotcopy ?
hello, i'm new to MySQL, so i have currently some basic questions. I have a MySQL-Server with 15 users. Every User can create databases. I expect that the amount of data which has to be backuped will increase constantly. What i want: I'd like to have a backup on a regular basis. I think i will create two cronjobs, one running daily, the other running weekly. Initially, we will have just MyISAM tables, later on maybe InnoDB tables. I'd like to backup _all_ databases, but having the possibility to restore only some databases. And the number and names of the databases change often, but i don't like to adapt my script regulary. Which tool do you recommend ? mysqldump or mysqlhotcopy ? Can i backup all databases with mysqlhotcopy using mysqlhotcopy --regexp=[a-zA-Z0-9]\+ ? Can i restore from this backup only some databases just copying the saved directories of the backuped databases to the MySQL-directory ? Thanks in advance. Bernd -- Bernd Lentes Systemadministration Institut für Entwicklungsgenetik HelmholtzZentrum münchen bernd.len...@helmholtz-muenchen.de phone: +49 89 3187 1241 fax: +49 89 3187 3826 http://www.helmholtz-muenchen.de/idg Im Kampf um das Unerreichbare verliert das Erreichte seinen Wert -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
does mysqlhotcopy affect the key buffer?
i run mysqlhotcopy on each database once every three hours. i happened to be running my cache warmer this afternoon, which logs timing for a bunch of standard randomized queries, that when the backup script ran, the query times increased by a factor of about 20 from a nice quick pace back down to what i'd expect for an empty cache. hot times then slowly settled back down to the faster pace as i would expect as cold caches warm up. (i really don't know if key or table caches are the bottleneck.) so i was wondering if mysqlhotcopy has affecting the caches. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
mysqlhotcopy
I am trying to use mysqlhotcopy on 2 different machines and I am having trouble on both of them. On the first machine, which is a Sun Solaris running mysql 4.0.15a, when I give the mysqlhotcopy command, I get the following error: DBD::mysql::db do failed: File './zemed/form_342.MYD' not found (Errcode: 24) at /usr/local/mysql/bin/mysqlhotcopy line 449. The file zemed/form_342.MYD does exist, but it's size is 0. On the second machine, which is a linux machine running mysql 5.0.45, when I give the mysqlhotcopy command, mysqlhotcopy web_positions /tmp/web_positions I get the error Invalid db.table name 'web_positions.web_positions`.`acadsec' at /usr/local/mysql/bin/mysqlhotcopy line 855. If I try to copy the mysql database, I get the error Invalid db.table name 'mysql.mysql`.`columns_priv' at /usr/local/mysql/bin/mysqlhotcopy line 855. Does anyone have any suggestions as to what I can do to get this to work. thanks. -- Malka Cymbalista Webmaster, Weizmann Institute of Science [EMAIL PROTECTED] 08-934-3036 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqlhotcopy errors osx
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]
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
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
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]
MySQLHotCopy
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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Mysqlhotcopy and replication
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 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 / 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]
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]
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]
mysqlhotcopy regexp
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]
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
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
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]
mysqlhotcopy
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
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]
MySQLHotCopy Error
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. The frm file it can't find varies with each attempt to use MySQLHotCopy. The files are there. We've flushed, optimized, and repaired all the tables in the database without any luck. The db appears to be working fine. MySQLHotCopy works ok with other databases on this server. MySQL 4.0.23 Server: Mac OSX Server 10.3.8 dual 1.33 Ghz PPC G4 with 2 GB SDRAM DB has 274 tables with 1.6 million records. DB size is 400 MB. Any insights would be greatly appreciated. TIA Stephen P. Fracek, Jr. [EMAIL PROTECTED] -- 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]
Mysqlhotcopy.
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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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]
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: mysql@lists.mysql.com 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
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: mysql@lists.mysql.com 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
Yep. - Original Message - From: Jeff McKeon [EMAIL PROTECTED] To: Jeremiah Gowdy [EMAIL PROTECTED]; mysql@lists.mysql.com 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: mysql@lists.mysql.com 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
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: Problem with mysqlhotcopy
Hello. e:\mysql\scripts\mysqlhotcopy.pl -u root -p password db_name /backup_test I think, the problem is in the missing period in /backup_test, it should be ./backup_test. But generally Windows isn't listed in operating systems list on which mysqlhotcopy works. Maybe cygwin will help. MightyData [EMAIL PROTECTED] wrote: I am running MySQL and Perl on Windows 2003. I am trying to use the mysqlhotocpy script for backup. Mysqlhotcopy will execute but returns an error. Command: e:\mysql\scripts\mysqlhotcopy.pl -u root -p password db_name /backup_test Error: The system cannot find the path specified. Executing command failed (256) Trying backtick execution... ...list_of_files... Failed (32768) while copying files - Kirk Bowman Phone: 972-390-8600 MightyData, LLC http://www.mightydata.com FileMaker 7 Certified Developer FileMaker Authorized Trainer Check out our FileMaker 7 training classes! - -- 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]
Problem with mysqlhotcopy
I am running MySQL and Perl on Windows 2003. I am trying to use the mysqlhotocpy script for backup. Mysqlhotcopy will execute but returns an error. Command: e:\mysql\scripts\mysqlhotcopy.pl -u root -p password db_name /backup_test Error: The system cannot find the path specified. Executing command failed (256) Trying backtick execution... ...list_of_files... Failed (32768) while copying files - Kirk Bowman Phone: 972-390-8600 MightyData, LLC http://www.mightydata.com FileMaker 7 Certified Developer FileMaker Authorized Trainer Check out our FileMaker 7 training classes! - -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Mysqlhotcopy on Windows
Is it possible to use mysqlhotcopy on Windows 2000 Server? If so, how? - Kirk Bowman Phone: 972-390-8600 MightyData, LLC http://www.mightydata.com FileMaker 7 Certified Developer FileMaker Authorized Trainer Check out our FileMaker 7 training classes! - -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqlhotcopy in replication setup run from slave
So, ran into a problem with using mysqlhotcopy to build a backup capable of starting a new replicant. The current option (record_log_pos) attempts to get master info from show master status, regardless of whether running on master or slave. It also uses show slave status to see where the slave is in processing master logs. I have found two problems with this ... - seems show master status returns nothing if you are not a master (and not logging a binlog) - takes the log position from the Read_Master_Log_Pos, which is only what the IO thread has read, and not what has been applied I have patched to add a new option --on_slave, which changes the behavior a bit. It now does not run show master, but instead gets all data from show slave status. It uses the Exec_master_log_pos to get the current log position and dies if Slave_IO_Running is not Yes. See attached patch. Any comments? Does this make sense to people? Any better ideas? I can say that this works, whereas the default does not. Meaning, I am able to take a snapshot, and build a new replicant off of that using the data retrieved from (record_log_pos). Greg -- Greg Whalin Meetup.com [EMAIL PROTECTED] --- /usr/local/mysql/bin/mysqlhotcopy 2004-10-23 12:15:09.0 -0400 +++ mysqlhotcopy 2004-12-07 13:17:12.780790784 -0500 @@ -75,6 +75,7 @@ --resetslave reset the master.info once all tables are locked --tmpdir=# temporary directory (instead of $opt_tmpdir) --record_log_pos=# record slave and master status in specified db.table + --on_slave tells record_log_pos that this is a slave box --chroot=# base directory of chroot jail in which mysqld operates Try \'perldoc $0\' for more complete documentation @@ -115,6 +116,7 @@ suffix=s, checkpoint=s, record_log_pos=s, +on_slave, flushlog, resetmaster, resetslave, @@ -478,8 +480,8 @@ $dbh-do( RESET SLAVE ) if ( $opt{resetslave} ); if ( $opt{record_log_pos} ) { - record_log_pos( $dbh, $opt{record_log_pos} ); - $dbh-do(FLUSH TABLES /*!32323 $hc_tables */); + record_log_pos( $dbh, $opt{record_log_pos}, $opt{on_slave} ); + $dbh-do(FLUSH TABLES /*!32323 $hc_tables */); } } @@ -743,28 +745,41 @@ } sub record_log_pos { -my ( $dbh, $table_name ) = @_; - +my ( $dbh, $table_name, $on_slave ) = @_; eval { - my ($file,$position) = get_row( $dbh, show master status ); - die master status is undefined if !defined $file || !defined $position; - - my ($master_host, undef, undef, undef, $log_file, $log_pos ) - = get_row( $dbh, show slave status ); - - my $hostname = hostname(); - - $dbh-do( qq{ replace into $table_name - set host=?, log_file=?, log_pos=?, - master_host=?, master_log_file=?, master_log_pos=? }, - undef, - $hostname, $file, $position, - $master_host, $log_file, $log_pos ); - + my ($file, $position, $master_host, $log_file, $log_pos); + my $hostname = hostname(); + + if (defined $on_slave) { + ## try to get from slave status + my $io_running; + ($master_host, undef, undef, undef, $file, $position, undef, undef, $log_file, $io_running, undef, undef, undef, undef, undef, undef, $log_pos, undef) += get_row( $dbh, show slave status ); + + if ($io_running ne 'Yes') { +die IO thread is not running, so can't get reliable master info; + } + } + else { + ## try to get from master and slave status + ($file,$position) = get_row( $dbh, show master status ); + die master status is undefined if !defined $file || !defined $position; + + ($master_host, undef, undef, undef, $log_file, $log_pos ) += get_row( $dbh, show slave status ); + } + + ## update the log table + $dbh-do( qq{ replace into $table_name + set host=?, log_file=?, log_pos=?, + master_host=?, master_log_file=?, master_log_pos=? }, + undef, + $hostname, $file, $position, + $master_host, $log_file, $log_pos ); }; if ( $@ ) { - warn Failed to store master position: [EMAIL PROTECTED]; + warn Failed to store master position: [EMAIL PROTECTED]; } } @@ -887,6 +902,13 @@ The name of the log-pos table should be supplied in database.table format. A sample log-pos table definition: +=item --on_slave + +This changes behavior of --record_log_pos to only check slave status. +This allows us to get an indication of the actual position in the master +log file we are at on this slave at the time of the hot copy so that you +can use this data to build another replicant from this running slave. + =over 4 CREATE TABLE log_pos ( -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqlhotcopy
Hi, I'm trying to use mysqlhotcopy to make a backup of some mysql databases. But when i try to run mysqlhotcopy I'm getting this error, [EMAIL PROTECTED] Temp]# mysqlhotcopy -u root dbxpto /root/Temp DBD::mysql::db do failed: You have an error in your SQL syntax near '` READ, `dbxpto`.``certificate`` READ, `dbxpto`.``crl`` READ, `dbxpto`.``c' at line 1 at /usr/bin/mysqlhotcopy line 438. Can some one tell me where is the problem ? My system is a Fedora Core 1, the mysql is mysql-3.23.58-4 and is the rpm version of Fedora. Thank's ND -- Nuno Dias [EMAIL PROTECTED] LIP -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
problem restoring backup made from mysqlhotcopy
Hi, Using a sample database, I have tablea and tableb. I populate tablea with some records and I can see the tablea.MYD file size increase on the drive, while tableb.MYD remains at zero bytes. Then I make a backup: mysqlhotcopy -u username -p password sample ./backup Next I modify the database: I delete the records from tablea and insert records in tableb and observe tableb file size increase on the drive, then I remove the sample directory inside /var/lib/mysql which contains the sample database Now I restore it like this: mv backup/sample . and I see the tableb.MYD file get adjusted back to zero, as it was before the modification, yet when I look at the database through mysql and through mysqlcc, it still shows the modified database! Anyone know why it isn't restoring to the original backup ?!? Thanx, Abuzar ([EMAIL PROTECTED]) __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: problem restoring backup made from mysqlhotcopy
Don't EVER copy to database files while the server is running. This is a guaranteed way to crash your database files. Shutdown the server. Copy the files. Start the server. Abuzar Chaudhary wrote: Hi, Using a sample database, I have tablea and tableb. I populate tablea with some records and I can see the tablea.MYD file size increase on the drive, while tableb.MYD remains at zero bytes. Then I make a backup: mysqlhotcopy -u username -p password sample ./backup Next I modify the database: I delete the records from tablea and insert records in tableb and observe tableb file size increase on the drive, then I remove the sample directory inside /var/lib/mysql which contains the sample database Now I restore it like this: mv backup/sample . and I see the tableb.MYD file get adjusted back to zero, as it was before the modification, yet when I look at the database through mysql and through mysqlcc, it still shows the modified database! Anyone know why it isn't restoring to the original backup ?!? Thanx, Abuzar ([EMAIL PROTECTED]) __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: problem restoring backup made from mysqlhotcopy
Aye, wish the documentation said something to that effect, it only said to restore it, simply copy the files back, without any examples or further explanation. Okay, so I'm not very good at linux, how do I stop and start the server without messing up how it starts or stops when the server is booted or shutdown? i.e. is it like Apache where apache stop, and apache start kind of commands will do the job? Thanx :) Abuzar --- gerald_clark [EMAIL PROTECTED] wrote: Don't EVER copy to database files while the server is running. This is a guaranteed way to crash your database files. Shutdown the server. Copy the files. Start the server. Abuzar Chaudhary wrote: Hi, Using a sample database, I have tablea and tableb. I populate tablea with some records and I can see the tablea.MYD file size increase on the drive, while tableb.MYD remains at zero bytes. Then I make a backup: mysqlhotcopy -u username -p password sample ./backup Next I modify the database: I delete the records from tablea and insert records in tableb and observe tableb file size increase on the drive, then I remove the sample directory inside /var/lib/mysql which contains the sample database Now I restore it like this: mv backup/sample . and I see the tableb.MYD file get adjusted back to zero, as it was before the modification, yet when I look at the database through mysql and through mysqlcc, it still shows the modified database! Anyone know why it isn't restoring to the original backup ?!? Thanx, Abuzar ([EMAIL PROTECTED]) __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: problem restoring backup made from mysqlhotcopy
On Tue, 1 Jun 2004 18:33:53 -0700 (PDT), Abuzar Chaudhary [EMAIL PROTECTED] wrote: Aye, wish the documentation said something to that effect, it only said to restore it, simply copy the files back, without any examples or further explanation. Okay, so I'm not very good at linux, how do I stop and start the server without messing up how it starts or stops when the server is booted or shutdown? i.e. is it like Apache where apache stop, and apache start kind of commands will do the job? login as superuser and try service mysqld stop servive mysqld start If your system complains that service command not found try /sbin/service mysqld stop /sbin/service mysqld start Thanx :) Abuzar --- gerald_clark [EMAIL PROTECTED] wrote: Don't EVER copy to database files while the server is running. This is a guaranteed way to crash your database files. Shutdown the server. Copy the files. Start the server. Abuzar Chaudhary wrote: Hi, Using a sample database, I have tablea and tableb. I populate tablea with some records and I can see the tablea.MYD file size increase on the drive, while tableb.MYD remains at zero bytes. Then I make a backup: mysqlhotcopy -u username -p password sample ./backup Next I modify the database: I delete the records from tablea and insert records in tableb and observe tableb file size increase on the drive, then I remove the sample directory inside /var/lib/mysql which contains the sample database Now I restore it like this: mv backup/sample . and I see the tableb.MYD file get adjusted back to zero, as it was before the modification, yet when I look at the database through mysql and through mysqlcc, it still shows the modified database! Anyone know why it isn't restoring to the original backup ?!? Thanx, Abuzar ([EMAIL PROTECTED]) __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- 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]
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]
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]
use mysqldump and mysqlhotcopy together?
Greetings, I've been looking at the backup/recover related discussions in the list archives for a while. Seems to me most people use either mysqldump or mysqlhotcopy. We don't have a good MySQL backup scheme in place yet. Now I have some questions based on my reading. How do I know how each table was created if using mysqlhotcopy solely if recovery needs to re-create the tables? On the other side, my concern about just using mysqldump is it may take long to backup and recover. The size of all the databases we want to back up is about 5G. We can only allow the databases unavailable for access for a couple of minutes at most if downtime can not be avoided completely. So I'm thinking about making use of both mysqldump and mysqlhotcopy together. By that I mean using mysqldump to dump table structures only (without any data) once a week so I can know how the tables were created in the first place and using mysqlhotcopy to backup actual database binary files every day. How bad is my idea? Thanks in advance for sharing experiences, Bing -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: use mysqldump and mysqlhotcopy together?
Hi, I'm a relative newbie at MySQL (Oracle DBA implementing MySQL in a production environment). There does seem to be a lack of 'Best Practice' documentation for MySQL in a production environment. I opted for using both mysqldump and mysqlhotcopy. Disk is cheap and everything is automated so why not. I have turned on the binary logs to facilitate a point in time recovery. As part of the mysqlhotcopy backup I flush the logs and copy the previous days logs to another location. I figure that I will use the hot backup and the binary logs for any disaster recovery and the dump for troubleshooting problems. Evelyn -Original Message- From: Bing Du [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 11:50 AM To: [EMAIL PROTECTED] Subject: use mysqldump and mysqlhotcopy together? Greetings, I've been looking at the backup/recover related discussions in the list archives for a while. Seems to me most people use either mysqldump or mysqlhotcopy. We don't have a good MySQL backup scheme in place yet. Now I have some questions based on my reading. How do I know how each table was created if using mysqlhotcopy solely if recovery needs to re-create the tables? On the other side, my concern about just using mysqldump is it may take long to backup and recover. The size of all the databases we want to back up is about 5G. We can only allow the databases unavailable for access for a couple of minutes at most if downtime can not be avoided completely. So I'm thinking about making use of both mysqldump and mysqlhotcopy together. By that I mean using mysqldump to dump table structures only (without any data) once a week so I can know how the tables were created in the first place and using mysqlhotcopy to backup actual database binary files every day. How bad is my idea? Thanks in advance for sharing experiences, Bing -- 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: use mysqldump and mysqlhotcopy together?
Bing Du wrote: Greetings, I've been looking at the backup/recover related discussions in the list archives for a while. Seems to me most people use either mysqldump or mysqlhotcopy. We don't have a good MySQL backup scheme in place yet. Now I have some questions based on my reading. We use mysqldump and then a standard backup tool triggered by cron to backup the file it creates. If you use mysqldump without the -d or -t flags, you will get the sql necessary to recreate the tables as well as the insert statements necessary to populate the tables. For our particular application (which generates large amounts of DB reads and very few inserts/updates/deletes) we found that using mysqldump gave us an accurate snapshot of the data and was less to back up since the indexes in our case can get quite large. We've been using that method for quite some time with good results. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqlhotcopy as a replication scheme
I've got an application that uses a fairly large (~50MM rows, ~1GB of disk) table of read-only data. The table changes maybe once a month, but when it changes, (almost) EVERY row in the table changes. The app needs to be replicated into several datacenters worldwide using relatively slow backend links. For this reason and others (I need to be able to control when each datacenter picks up updates, etc.) native MySQL replication isn't attractive. I'm considering building a scheme where I insert the data into a table once and ship around a gzipped mysqldump and load it into each datacenter -- this is easy, uses less bandwidth, is easy to control via cron and fits well into the rest of our infrastructure. Then I found mysqlhotcopy. Neato! I've tested, and this seems to work: 1) use mysqlhotcopy to copy the table on the replication master 2) gzip the table/index/data files and ship them someplace remote 3) (on the slave) unzip them 4) LOCK TABLES foo WRITE 5) FLUSH TABLE foo 6) copy the unzipped data files over the running mysql data files for the single table I'm intersted in. There's clearly a problem here if the machine crashes during this step, but it can be worked out to just 3 calls to rename(2), which is atomic on a POSIX fs, so that's less an issue than it could be. 7) FLUSH TABLE foo 8) profit! It looks like table foo now contains the new data. It takes a LOT less time than reinserting all the data into the table. Other than you should really use mysql native replication, does anyone have any comments on whether this is likely to be reliable, or why it's a bad idea? I'm using 3.23.49 (Debian stable); Is FLUSH TABLE likely to change in future versions in a way that will break this? -- thanks, Will -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQLHotCopy - No tables to hot-copy HUH?!
I have a problem using mysqlhotcopy. Everything was fine until I recently moved to a different server. Old one was running mysql 4.0.15 on FreeBSD 4.8, new is mysql 4.0.16 on FreeBSD 4.9. The error returned is No tables to hot-copy at /usr/local/bin/mysqlhotcopy line 379. I ran w/ --debug and here is the result... mysqlhotcopy drew /storedarea/drew -u alloweduser -p notpostedhere --debug Filtering tables with '(?-xism:.*)' $VAR1 = [ { 'index' = [], 'src' = 'drew', 'raid_dirs' = [], 'tables' = [], 'files' = [ 'homework.MYD', 'homework.MYI', 'homework.frm', 'teacher.MYD', 'teacher.MYI', 'teacher.frm', 'users.MYD', 'users.MYI', 'users.frm' ], 't_regex' = '.*', 'target' = '/storedarea/drew' } ]; No tables to hot-copy at /usr/local/bin/mysqlhotcopy line 379. Here is a show tables from the terminal... mysql show tables; ++ | Tables_in_drew | ++ | homework | | teacher| | users | ++ 3 rows in set (0.00 sec) I would greatly appreciate some help here. Thanks. Lewis -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Lost Data with delayed insert / mysqlhotcopy
Description: mysqlhotcopy (but possible any other software) can cause delayed handlers to terminate with Delayed insert thread couldn't get requested lock for I havent worked out the exact conditions under wich mysqlhotcopy fails, but it seems that if mysqlhotcopy tries to get a lock (waiting for a query to finish) and you start another delayed insert (maybe involving several tables?), then it will fail the server The description below, extracts the fault without mysqlhotcopy and failed always on my system How-To-Repeat: you need two mysql client connection: (assuming a table tb with a column a int) 1 LOCK TABLES tb READ; 2 insert delayed into tb values(1); 1 flush tables; # the delayed handler dies here, the insert is not in the table 1 unlock tables Fix: Submitter-Id: [EMAIL PROTECTED] Originator: Organization: MySQL support: none Synopsis: data loss with delayed insert Severity: serious Priority: low Category: mysql Class: Release: mysql-4.0.15 (FreeBSD port: mysql-server-4.0.15) Server: /usr/local/bin/mysqladmin Ver 8.40 Distrib 4.0.13, for portbld-freebsd4.8 on i386 Copyright (C) 2000 MySQL AB MySQL Finland AB TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 4.0.15 Protocol version10 Connection Localhost via UNIX socket UNIX socket /tmp/mysql.sock Uptime: 8 days 23 hours 34 min 32 sec Threads: 6 Questions: 138727 Slow queries: 1 Opens: 209 Flush tables: 4 Open tables: 15 Queries per second avg: 0.179 C compiler:2.95.4 C++ compiler: 2.95.4 Environment: System: FreeBSD dionysus.london.hybyte.com 4.8-STABLE FreeBSD 4.8-STABLE #0: Tue Aug 12 12:52:01 BST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/DIONYSUS i386 Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Using builtin specs. gcc version 2.95.4 20020320 [FreeBSD] Compilation info: CC='cc' CFLAGS='-O1 -pipe -mcpu=i686 -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -O3 -fno-omit-frame-pointer' CXX='cc' CXXFLAGS='-O1 -pipe -mcpu=i686 -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -O3 -fno-omit-frame-pointer -felide-constructors -fno-rtti -fno-exceptions' LDFLAGS='' ASFLAGS='' LIBC: -r--r--r-- 1 root wheel 1224554 Aug 12 12:52 /usr/lib/libc.a lrwxr-xr-x 1 root wheel 9 Aug 12 12:52 /usr/lib/libc.so - libc.so.4 -r--r--r-- 1 root wheel 578880 Aug 12 12:52 /usr/lib/libc.so.4 Configure command: ./configure '--localstatedir=/var/db/mysql' '--without-debug' '--without-readline' '--without-bench' '--without-extra-tools' '--with-libwrap' '--with-mysqlfs' '--with-vio' '--with-low-memory' '--with-comment=FreeBSD port: mysql-server-4.0.15' '--enable-thread-safe-client' '--enable-assembler' '--with-berkeley-db' '--with-openssl' '--with-named-thread-libs=-DHAVE_GLIBC2_STYLE_GETHOSTBYNAME_R -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -L/usr/local/lib -llthread -llgcc_r' '--prefix=/usr/local' '--build=i386-portbld-freebsd4.8' 'CFLAGS=-O1 -pipe -mcpu=i686 -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -O3 -fno-omit-frame-pointer' 'CXX=cc' 'build_alias=i386-portbld-freebsd4.8' 'CC=cc' 'CXXFLAGS=-O1 -pipe -mcpu=i686 -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -O3 -fno-omit-frame-pointer -felide-constructors -fno-rtti -fno-exceptions' -- 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 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
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]
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: %mysqlhotcopy -u root --suffix=091703 staff /backups 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. 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]
mysqlhotcopy fails under linux RH9
Hello, I tried to use mysqlhotcopy which previously worked under RH8 but now fails under RH9. I have the following packages installed: perl-DBD-MySQL-2.1021-3 MySQL-devel-4.0.12-0 MySQL-server-4.0.12-0 MySQL-client-4.0.12-0 MySQL-shared-4.0.12-0 qt-MySQL-3.1.1-6 but get this: ___ERROR__ install_driver(mysql) failed: Can't load '/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread- multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.10: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/bin/mysqlhotcopy line 166 ___ERROR__ I can see that /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread- multi/auto/DBD/mysql/mysql.so does exist as does /usr/lib/perl5/5.8.0/i386- linux-thread-multi/DynaLoader.pm Is this a known issue? Anything I can do other than use dump? -- Shawn Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqlhotcopy fails under linux RH9
Is mysqlhotcopy not available for 4.0.12? The error message I got asked for libmysqlclient.so.10 which seems to be a MySQL-client-3.23.xx feature. 4.0.12 appears not to support it (correct)? /usr/bin/msql2mysql /usr/bin/mysql /usr/bin/mysql_find_rows /usr/bin/mysql_waitpid /usr/bin/mysqlaccess /usr/bin/mysqladmin /usr/bin/mysqlbinlog /usr/bin/mysqlcheck /usr/bin/mysqldump /usr/bin/mysqlimport /usr/bin/mysqlshow /usr/share/man/man1/mysql.1.gz /usr/share/man/man1/mysqlaccess.1.gz /usr/share/man/man1/mysqladmin.1.gz /usr/share/man/man1/mysqldump.1.gz /usr/share/man/man1/mysqlshow.1.gz Hello, I tried to use mysqlhotcopy which previously worked under RH8 but now fails under RH9. I have the following packages installed: perl-DBD-MySQL-2.1021-3 MySQL-devel-4.0.12-0 MySQL-server-4.0.12-0 MySQL-client-4.0.12-0 MySQL-shared-4.0.12-0 qt-MySQL-3.1.1-6 but get this: ___ERROR__ install_driver(mysql) failed: Can't load '/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread- multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.10: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected at /usr/bin/mysqlhotcopy line 166 ___ERROR__ I can see that /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread- multi/auto/DBD/mysql/mysql.so does exist as does /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm Is this a known issue? Anything I can do other than use dump? -- Shawn Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- 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]
mysqlhotcopy problem
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 ? Working system: RedHat 7.3 MySQL 3.23.56 (compiled manualy) Perl 5.6.1 DBD-mysql-2.1026 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqlhotcopy on innoDB
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 Thanks for some answers, Moritz
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]
mysqlhotcopy / bin-log manipulation
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). 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 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? Any help appreciated! -- 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]
mysqlhotcopy does not read configuration files.
Description: mysqlhotcopy does not read defaults from my.cnf and .my.cnf files. How-To-Repeat: Run mysqlhotcopy and observe it doesn't read client defaults. Fix: See below for patch, shown as a context diff Submitter-Id: submitter ID Originator:Larry Stone Organization: MIT (Massachusetts Institute of Technology) MySQL support: none Synopsis: mysqlhotcopy does not read defaults from my.cnf and .my.cnf files. Severity: non-critical Priority: medium Category: mysql Class: sw-bug Release: mysql-4.0.12-standard (Official MySQL-standard binary) C compiler:gcc (GCC) 3.2 C++ compiler: gcc (GCC) 3.2 Environment: System: SunOS speaker-to-teletypes.mit.edu 5.8 Generic_108528-18 sun4u sparc SUNW,Sun-Blade-100 Architecture: sun4 Some paths: /usr/athena/bin/perl /usr/ccs/bin/make /usr/athena/bin/gmake /mit/gnu/arch/sun4x_58/bin/gcc /usr/athena/bin/cc GCC: Reading specs from /mit/gnu/arch/sun4x_58/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='gcc' CFLAGS='-O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' ASFLAGS='' LIBC: lrwxrwxrwx 1 root root 18 Aug 9 2002 /lib/libc.a - /os/usr/lib/libc.a lrwxrwxrwx 1 root root 11 Aug 9 2002 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1157924 Mar 18 21:34 /lib/libc.so.1 lrwxrwxrwx 1 root root 18 Aug 9 2002 /usr/lib/libc.a - /os/usr/lib/libc.a lrwxrwxrwx 1 root root 11 Aug 9 2002 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1157924 Mar 18 21:34 /usr/lib/libc.so.1 Configure command: ./configure '--prefix=/usr/local/mysql' '--with-comment=Official MySQL-standard binary' '--with-extra-charsets=complex' '--with-server-suffix=-standard' '--enable-thread-safe-client' '--enable-local-infile' '--enable-assembler' '--with-named-z-libs=no' '--with-named-curses-libs=-lcurses' '--disable-shared' '--with-innodb' 'CC=gcc' 'CFLAGS=-O3 -fno-omit-frame-pointer' 'CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' 'CXX=gcc' -- Here is my patch that fixes the problem, agains the version 4.0.12 source: *** mysqlhotcopy.orig Sat Mar 15 12:06:50 2003 --- mysqlhotcopyFri Apr 11 19:33:13 2003 *** *** 80,85 --- 80,100 die @_, $OPTIONS; } + ## get defaults from my.cnf, .my.cnf files: + my $my_print_defaults = 'my_print_defaults'; + if ($0 =~ m#^/#) { + my ($mybindir) = ($0 =~ m#(^.+)/[^/]+$#); + $my_print_defaults = ${mybindir}/my_print_defaults + if length($mybindir); + } + my @defops = `$my_print_defaults client mysqlhotcopy`; + if ($?) { + warn Failed to invoke $my_print_defaults, cannot read defaults from files.; + } else { + chop @defops; + splice @ARGV, 0, 0, @defops; + } + my %opt = ( user = scalar getpwuid($), noindices = 0, -- 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]
mysqlhotcopy generates a segmentation fault
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? Box 1: Debian Linux, 2.4.18. mysql 3.23.50, mysqlhotcopy 1.16, perl 5.6.1, libdbi-perl (1.21-2), libdbd-mysql-perl 1.2219-4 Box 2: Debian Linux, 2.4.18, mysql 3.23.49, mysqlhotcopy 1.14, perl 5.6.1, libdbi-perl (1.21-2), libdbd-mysql-perl 1.2219-4 Box 3: Debian Linux, 2.4.19. mysql 4.0.13, mysqlhotcopy 1.18, perl 5.8.0, libdbi-perl (1.35), libdbd-mysql-perl 2.1026 Danny. -- 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: 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]
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]
Mysqlhotcopy usage problem
Hello All, I am facing following error while I am trying to use mysqlhotcopy utility for hot backups. I am not sure that how can I check the perl correct installation. Please see below [EMAIL PROTECTED]:/usr/local/mysql/bin mysqlhotcopy --help Can't locate DBI.pm in @INC (@INC contains: /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi /opt/perl/lib/5.6.1 /opt/perl/lib/site_perl/5.6.1/PA-RISC1.1-thread-multi /opt/perl/lib/site_perl/5.6.1 /opt/perl/lib/site_perl .) at /usr/local/mysql/bin/mysqlhotcopy line 8. BEGIN failed--compilation aborted at /usr/local/mysql/bin/mysqlhotcopy line 8. My O/S is HP-UX 11 and My-SQL verion 4.0.9 Any help will be highly appreciated. Sanjeev Sagar EDS - My-SQL DBA -- 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]
mysqlhotcopy script problem
Greetings: Attempting to run mysqlhotcopy on my RH 7.3 server/ MySQL 4.012 generates the following: install_driver(mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.10: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 206. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected However, mysql.so is present in the proper path so I suspect the error message might be a red-herring. As well, the requisite RPMs are present, ie: perl-DBI perl-DBD-MySQL Has anyone experienced this error and gotten past it? Much thanks, -stu -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
mysqlhotcopy usage
Hello mysql fans ;-), 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 ? Does it work with any table type (Innodb,BDB, Merge, MyISAM) ? Any comments much appreciated. --- To general list Moderator: Please relist in case I put into the wrong list. Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp/staff/nils 182-0024 4-6-1 7F Phone: 0424-40-7912 Fax: 0424-40-7913 URL: http://www.knowd.co.jp -- 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
Problem with mysqlhotcopy version 1.17 when using --record_log_pos
Description: With mysqlhotcopy version 1.15 (from MySQL-3.23.49-1) I used to do like this: mysqlhotcopy --user=root --password=foo -q --allowold --record_log_pos backup.log_pos db1 db2 backup $TMPDIR After upgrading to MySQL-3.23.55-1 and thus mysqlhotcopy version 1.17 the same command gave this error: DBD::mysql::db do failed: Not unique table/alias: 'log_pos' at /usr/bin/mysqlhotcopy line 437. The problem is that line 311 now adds backticks around database and table names: my @hc_tables = map { `$db`.`$_` } @dbh_tables; This is not taken into account at line 422 where $table comes directly from $opt{checkpoint} or $opt{record_log_pos}: unless ( $hc_locks =~ s/$table\s+READ/$table WRITE/ ); The resulting lock-command becomes: LOCK TABLES `db1`.`table1` READ, `db2`.`table1` READ, `backup`.`log_pos` READ, backup.log_pos WRITE How-To-Repeat: Try issuing the command mysqlhotcopy --user=root --password=foo -q --allowold --record_log_pos backup.log_pos db1 db2 backup $TMPDIR where the database that the log_pos is recorded in is also in the list of databases to backup. Fix: Fix documentation so it doesn't say The name of the log-pos table should be supplied in database.table format. but ... supplied in \`database\`.\`table\` format. Or better, add this fix (sorry about my Perl - I know it is bad): --- mysqlhotcopy.orig Wed Jan 29 14:00:00 2003 +++ mysqlhotcopyWed Jan 29 14:00:14 2003 @@ -113,6 +113,14 @@ dryrun|n, ) or usage(Invalid option); +# Make sure that $opt{record_log_pos} is of form `db`.`table` +if (defined($opt{record_log_pos})) +{ +$opt{record_log_pos} =~ tr/\`//d; +$opt{record_log_pos} =~ s/\./\`\.\`/; +$opt{record_log_pos} = \`$opt{record_log_pos}\`; +} + # @db_desc # == # a list of hash-refs containing: The same should probably be done for $opt{checkpoint}. Submitter-Id:[EMAIL PROTECTED] Originator: Soeren Thing Andersen Organization: TDC MySQL support: none Synopsis:Backticks not added to $opt{record_log_pos} Severity:non-critical Priority:medium Category:mysql Class: sw-bug Release: mysql-3.23.55 (Official MySQL RPM) Environment: System: Linux alarmnetgw2.vpn.alarm-net.dk 2.4.9-31 #1 Tue Feb 26 07:11:02 EST 2002 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-85) Compilation info: CC='gcc' CFLAGS='-O6 -fno-omit-frame-pointer -mpentium' CXX='gcc' CXXFLAGS='-O6 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mpentium' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 Oct 10 14:51 /lib/libc.so.6 - libc-2.2.4.so -rwxr-xr-x1 root root 1285884 Sep 9 18:10 /lib/libc-2.2.4.so -rw-r--r--1 root root 27336078 Sep 9 17:48 /usr/lib/libc.a -rw-r--r--1 root root 178 Sep 9 17:48 /usr/lib/libc.so Configure command: ./configure '--disable-shared' '--with-mysqld-ldflags=-all-static' '--with-client-ldflags=-all-static' '--without-berkeley-db' '--without-innodb' '--enable-assembler' '--enable-local-infile' '--with-mysqld-user=mysql' '--with-unix-socket-path=/var/lib/mysql/mysql.sock' '--prefix=/' '--with-extra-charsets=complex' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--infodir=/usr/share/info' '--includedir=/usr/include' '--mandir=/usr/share/man' '--with-comment=Official MySQL RPM' 'CC=gcc' 'CFLAGS=-O6 -fno-omit-frame-pointer -mpentium' 'CXXFLAGS=-O6 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mpentium' 'CXX=gcc' - 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
Mysqlhotcopy and reuilding indexes
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. It seems like I have missed something here, but I can't find exactly what I'm missing from reading the manual. Some help would be appreciated Erlend Stromsvik - 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
mysqldump or mysqlhotcopy?
Greetings, I would like to set up cron jobs on my servers to make backups of my databases: 1. The reference manual recommends mysqlhotcopy over mysqldump. Any opinions? 2. What format does mysqlhotcopy save in? sql files? csv? 3. Anyone else doing this with cron? I'd like to see a sample command. TIA Best regards, Nicole - 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
mysqlhotcopy should suggest ~/.my.cnf instead of --password
Description: The mysqlhotcopy manpage suggests giving the password via the command line option '--password'. This is higly insecure as every system user is able to read it. How-To-Repeat: RTFM ;-) Fix: Please apply the following patch: --- mysql-dfsg-3.23.54a/scripts/mysqlhotcopy.sh.orig2002-12-23 17:06:18.0 +0100 +++ mysql-dfsg-3.23.54a/scripts/mysqlhotcopy.sh 2002-12-23 17:18:06.0 +0100 @@ -49,7 +49,8 @@ -?, --help display this helpscreen and exit -u, --user=# user for database login if not current user - -p, --password=# password to use when connecting to server + -p, --password=# password to use when connecting to server if not set + in e.g. ~/.my.cnf -h, --host=#Hostname for local server when connecting over TCP/IP -P, --port=# port to use when connecting to local server with TCP/IP -S, --socket=# socket to use when connecting to local server @@ -893,7 +894,11 @@ =item -p, --password=# -password to use when connecting to server +password to use when connecting to server. Note that you are strongly encouraged +*not* to use this option as every user would be able to see the password in the +process list. Instead use the '[mysqlhotcopy]' section in one of the config +files, normally /etc/mysql/my.cnf or your personal ~/.my.cnf. +(See manual '4.1.2 my.cnf Option Files') =item -h, -h, --host=# Submitter-Id: submitter ID Originator:Christian Hammers Organization: The Debian Project MySQL support: none Synopsis: mysqlhotcopy manpage suggests --password instead of ~/.my.cnf Severity: non-critical Priority: low Category: mysql Class: doc-bug Release: mysql-4.0.6-gamma (Source distribution) Environment: System: Linux app109 2.4.20-app109-1 #4 Thu Dec 5 21:44:44 CET 2002 i686 unknown unknown GNU/Linux Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20011002 (Debian prerelease) Compilation info: CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' LDFLAGS='' ASFLAGS='' LIBC: lrwxrwxrwx1 root root 13 2002-11-20 02:56 /lib/libc.so.6 - libc-2.3.1.so -rwxr-xr-x1 root root 1109068 2002-11-19 19:13 /lib/libc-2.3.1.so -rw-r--r--1 root root 2344038 2002-11-19 19:14 /usr/lib/libc.a -rw-r--r--1 root root 178 2002-11-19 19:14 /usr/lib/libc.so -rw-r--r--1 root root 716080 2002-01-13 21:06 /usr/lib/libc-client.so.2001 Configure command: ./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--sysconfdir=/etc/mysql' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-raid' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--with-client-ldflags=-lstdc++' '--with-embedded-server' '--with-vio' '--with-openssl' '--without-docs' '--without-bench' '--without-readline' '--with-extra-charsets=all' '--with-berkeley-db' '--with-innodb' - 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
mysqlhotcopy segfaults with perl 5.8
mysqlhotcopy always worked fine with perl 5.6.1 (debian woody), but i had to upgrade to perl 5.8 and now it croaks and dies with a segfault. the problem exists only with mysqlhotcopy; other db-connections with perl 5.8 and DBI/DBD::mysql are no problem. at http://volltext.net/mysql/strace.txt you find the full output of strace (71kB) snipped output of perl -d mysqlhotcopy -n fwwb./UserDepot/ /var/tmp/ ---8- [...] 921:my (%hash, $i, $h); DBI::_new_handle(/usr/local/www/perl/lib/site_perl/5.8.0/i686-linux-stdio/DBI. :922): 922:$i = tie%hash, $class, $attr; # ref to inner hash (for driver DBI::st::TIEHASH(/usr/local/www/perl/lib/site_perl/5.8.0/i686-linux-stdio/DBI. :932): 932:sub DBI::st::TIEHASH { bless $_[1] = $_[0] }; DBI::_new_handle(/usr/local/www/perl/lib/site_perl/5.8.0/i686-linux-stdio/DBI. :923): 923:$h = bless \%hash, $class; # ref to outer hash (for applic ion) DBI::_new_handle(/usr/local/www/perl/lib/site_perl/5.8.0/i686-linux-stdio/DBI. :926): 926:DBI::_setup_handle($h, $imp_class, $parent, $imp_data); DBI::_new_handle(/usr/local/www/perl/lib/site_perl/5.8.0/i686-linux-stdio/DBI. :928): 928:return $h unless wantarray; DBD::mysql::dr::connect(/usr/local/www/perl/lib/site_perl/5.8.0/i686-linux-std /DBD/mysql.pm:128): 128:DBD::mysql::db::_login($this, $dsn, $username, $password) 129: or $this = undef; [debugging output stops here] ---8- How-To-Repeat: replace /usr/bin/perl (version 5.6.1 as packaged with debian) with a selfcompiled perl 5.8 Fix: point shebang in mysqlhotcopy script back to perl version 5.6.1 Submitter-Id: submitter ID Originator:root Organization: MySQL support: none Synopsis: mysqlhotcopy segfaults with perl 5.8 Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.52 (Source distribution) Server: /usr/local/mysql/bin/mysqladmin Ver 8.23 Distrib 3.23.52, for pc-linux-gnu on i686 Copyright (C) 2000 MySQL AB MySQL Finland AB TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 3.23.52-log Protocol version10 Connection Localhost via UNIX socket UNIX socket /tmp/mysql.sock Uptime: 1 day 15 hours 5 sec Threads: 7 Questions: 2173091 Slow queries: 5 Opens: 24719 Flush tables: 1 Open tables: 64 Queries per second avg: 15.477 Environment: perl is 5.8 (compiled from source) DBI : 1.30 DBD::mysql : 2.1020 machine is a hp netserver lp2000r (dual pIII 1133MHz) opsys is debian woody System: Linux kaelte.wirtschaftsblatt.at 2.4.19 #3 SMP Wed Oct 2 14:10:50 CEST 2002 i686 unknown Architecture: i686 Some paths: /usr/local/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20011002 (Debian prerelease) Compilation info: CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 6. Nov 12:52 /lib/libc.so.6 - libc-2.2.5.so -rwxr-xr-x1 root root 1145456 18. Sep 04:50 /lib/libc-2.2.5.so -rw-r--r--1 root root 2376426 18. Sep 04:51 /usr/lib/libc.a -rw-r--r--1 root root 178 18. Sep 04:51 /usr/lib/libc.so Configure command: ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/data/mysql --with-mysql-user=mysql --with-gnu-ld --with-charset=german1 --enable-assembler - 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
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
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
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
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
mysqlhotcopy ignores --host or -h option
Description: mysqlhotcopy ignores --host -h option How-To-Repeat: call mysqlhotcopy with a host differs from localhost Fix: Add host|h=s to GetOptions Submitter-Id: submitter ID Originator: Organization: organization of PR author (multiple lines) MySQL support: none Synopsis: synopsis of the problem (one line) Severity: non-critical Priority: low Category: mysql Class: sw-bug Release: mysql-3.23.53 (Source distribution) Environment: machine, os, target, libraries (multiple lines) System: Linux debmu401 2.4.19 #1 SMP Tue Sep 10 09:00:50 CEST 2002 i686 unknown Architecture: i686 Some paths: /DBA/public/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 2731 (Red Hat Linux 7.2 2.96-108.7.2) Compilation info: CC='gcc' CFLAGS='' CXX='g++' CXXFLAGS='' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 Sep 2 15:53 /lib/libc.so.6 - libc-2.2.4.so -rwxr-xr-x1 root root 5735106 Aug 7 13:03 /lib/libc-2.2.4.so -rw-r--r--1 root root 27336078 Aug 7 12:56 /usr/lib/libc.a -rw-r--r--1 root root 178 Aug 7 12:57 /usr/lib/libc.so Configure command: ./configure --prefix=/DBA/mysql/SQL/3.23.53 --enable-thread-safe-client - 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, 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
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? Thank you, Jing _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - 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 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
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 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 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
mysqlhotcopy problem - Segmentation fault
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. There is nothing fancy in the my.cnf file - I have the default configuration for mysqlhotcopy: [mysqlhotcopy] interactive-timeout Any ideas? Does anyone has had such problem? It's not critical, but it's strange. Mihail Manolov Government Liquidation, LLC 202 467 6868 x.227 [EMAIL PROTECTED] www.govliquidation.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
mysqlhotcopy problem - Segmentation fault
I have strange problem - I get Segmentation fault error when I am trying to execute mysqlhotcopy. When I remove the [mysqlhotcopy] and [client] sections in my /etc/my.cnf configuration it works. Meanwhile, on another server it works just fine with the same configuration file. There is nothing fancy in the my.cnf file - I have the default configuration for mysqlhotcopy: [mysqlhotcopy] interactive-timeout Any ideas? Does anyone has had such problem? It's not critical, but it's strange. Mihail Manolov Government Liquidation, LLC 202 467 6868 x.227 [EMAIL PROTECTED] www.govliquidation.com sql, query, mysql - 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
Mysqlhotcopy error
I am looking into using the mysqlhotcopy.pl script to back-up my databases. When I try to run it, I get the following error: The getpwuid function is unimplemented at C:\mysql\scripts\mysqlhotcopy.pl line 79. I'm not familiar enough with perl to even begin debugging the script myself.. Does anybody recognize this symptom and know whether I'm missing a perl module or something easy like that? Tab - 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
mysqlhotcopy / perl problem
Description: The mysqlhotcopy script fails with recent versions of perl. How-To-Repeat: Invoke mysqlhotcopy with perl 5.6.1. (I'm on a NetBSD box.) The script fails, complaining it can't create the target directory. Fix: In the section of the script that creates the target folder (line 400 or so) add this line to remove the trailing slash: $tgt_dirpath =~ s/\/$//; Submitter-Id: submitter ID Originator:Scott Lahteine Organization: Critical Path Software MySQL support: none Synopsis: The mysqlhotcopy script fails Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.49 (Source distribution) Environment: i386 NetBSD System: NetBSD wwwdev.criticalpath.com 1.5.2 NetBSD 1.5.2 (WWWDEV) #0: Thu Nov 15 10:26:08 PST 2001 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/WWWDEV i386 Some paths: /usr/bin/perl /usr/bin/make /usr/pkg/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Using builtin specs. gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release) Compilation info: CC='cc' CFLAGS='-I/usr/pkg/include -O2' CXX='c++' CXXFLAGS='-I/usr/pkg/include -I/usr/pkg/include -O2' LDFLAGS='-L/usr/pkg/lib -Wl,-R/usr/pkg/lib/mysql -Wl,-R/usr/pkg/lib' LIBC: -r--r--r-- 1 root wheel 1204396 Aug 23 2001 /usr/lib/libc.a lrwxr-xr-x 1 root wheel 15 Aug 23 2001 /usr/lib/libc.so - libc.so.12.62.1 lrwxr-xr-x 1 root wheel 15 Aug 23 2001 /usr/lib/libc.so.12 - libc.so.12.62.1 -r--r--r-- 1 root wheel 616052 Aug 23 2001 /usr/lib/libc.so.12.62.1 Configure command: ./configure --localstatedir=/var/mysql --with-named-z-libs=z --without-libwrap '--with-named-curses-libs=-lcurses -ltermcap' --without-readline --without-docs --without-debug --without-bench --with-low-memory --without-server --host=i386--netbsdelf --prefix=/usr/pkg - 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
problem with mysqlhotcopy
Hi mysql wizards, I've a problem with mysqlhotcopy, i.e. the 'copy step' fails. I've no idea why (for I don't understand perl), could anyone help? Here is how mysqlhotcopy is invoked (intentionaly using option '-n' here): mysqlhotcopy webimages /swpr_ss02-2/frisbee/dbbackups --allowold --keepold -u frisbeebackup -p DOIT -n rmtree /swpr_ss02-2/frisbee/dbbackups/webimages_old rename /swpr_ss02-2/frisbee/dbbackups/webimages, /swpr_ss02-2/frisbee/dbbackups/webimages_old mkdir /swpr_ss02-2/frisbee/dbbackups/webimages/, 0750 LOCK TABLES webimages.CONFIGURATION READ, webimages.CONTEXTS READ, webimages.HOSTS READ, webimages.HTMLPAGES READ, webimages.HTMLPAGES_OLD READ, webimages.IMAGES READ, webimages.IMAGES_OLD READ, webimages.IMAGE_DATA READ, webimages.JOBENTRY_CONTEXTANALYSIS READ, webimages.JOBENTRY_DLCONTEXT READ, webimages.JOBENTRY_DLIMAGE READ, webimages.JOBENTRY_IMAGE_FEATURES READ, webimages.JOBENTRY_IMAGE_INFO READ, webimages.JOBLIST_CONTEXTANALYSIS READ, webimages.JOBLIST_DLCONTEXT READ, webimages.JOBLIST_DLIMAGE READ, webimages.JOBLIST_IMAGE_FEATURES READ, webimages.JOBLIST_IMAGE_INFO READ, webimages.KEYWORDS READ, webimages.KEYWORDS_OLD READ, webimages.MN_IMAGES_KEYWORDS READ FLUSH TABLES /*!32323 webimages.CONFIGURATION, webimages.CONTEXTS, webimages.HOSTS, webimages.HTMLPAGES, webimages.HTMLPAGES_OLD, webimages.IMAGES, webimages.IMAGES_OLD, webimages.IMAGE_DATA, webimages.JOBENTRY_CONTEXTANALYSIS, webimages.JOBENTRY_DLCONTEXT, webimages.JOBENTRY_DLIMAGE, webimages.JOBENTRY_IMAGE_FEATURES, webimages.JOBENTRY_IMAGE_INFO, webimages.JOBLIST_CONTEXTANALYSIS, webimages.JOBLIST_DLCONTEXT, webimages.JOBLIST_DLIMAGE, webimages.JOBLIST_IMAGE_FEATURES, webimages.JOBLIST_IMAGE_INFO, webimages.KEYWORDS, webimages.KEYWORDS_OLD, webimages.MN_IMAGES_KEYWORDS */ Copying 63 files... cp -p /swpr_ss02-2/frisbee/dbbackups/webimages Copying indices for 0 files... UNLOCK TABLES As you can see, the cp command is missing the source parameter... This is mysqlhotcopy version 1.14 running on a debian linux. Regards, Ralf -- - Ralf Jüngling Institut für Informatik - Lehrstuhl f. Mustererkennung Bildverarbeitung Georges-Köhler-Allee Gebäude 52 Tel: +49-(0)761-203-8215 79110 Freiburg Fax: +49-(0)761-203-8262 - - 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
problem with mysqlhotcopy
Hi mysql wizards, I've a problem with mysqlhotcopy, i.e. the 'copy step' fails. I've no idea why (for I don't understand perl), could anyone help? Here is how mysqlhotcopy is invoked (intentionaly using option '-n' here): mysqlhotcopy webimages /swpr_ss02-2/frisbee/dbbackups --allowold --keepold -u frisbeebackup -p DOIT -n rmtree /swpr_ss02-2/frisbee/dbbackups/webimages_old rename /swpr_ss02-2/frisbee/dbbackups/webimages, /swpr_ss02-2/frisbee/dbbackups/webimages_old mkdir /swpr_ss02-2/frisbee/dbbackups/webimages/, 0750 LOCK TABLES webimages.CONFIGURATION READ, webimages.CONTEXTS READ, webimages.HOSTS READ, webimages.HTMLPAGES READ, webimages.HTMLPAGES_OLD READ, webimages.IMAGES READ, webimages.IMAGES_OLD READ, webimages.IMAGE_DATA READ, webimages.JOBENTRY_CONTEXTANALYSIS READ, webimages.JOBENTRY_DLCONTEXT READ, webimages.JOBENTRY_DLIMAGE READ, webimages.JOBENTRY_IMAGE_FEATURES READ, webimages.JOBENTRY_IMAGE_INFO READ, webimages.JOBLIST_CONTEXTANALYSIS READ, webimages.JOBLIST_DLCONTEXT READ, webimages.JOBLIST_DLIMAGE READ, webimages.JOBLIST_IMAGE_FEATURES READ, webimages.JOBLIST_IMAGE_INFO READ, webimages.KEYWORDS READ, webimages.KEYWORDS_OLD READ, webimages.MN_IMAGES_KEYWORDS READ FLUSH TABLES /*!32323 webimages.CONFIGURATION, webimages.CONTEXTS, webimages.HOSTS, webimages.HTMLPAGES, webimages.HTMLPAGES_OLD, webimages.IMAGES, webimages.IMAGES_OLD, webimages.IMAGE_DATA, webimages.JOBENTRY_CONTEXTANALYSIS, webimages.JOBENTRY_DLCONTEXT, webimages.JOBENTRY_DLIMAGE, webimages.JOBENTRY_IMAGE_FEATURES, webimages.JOBENTRY_IMAGE_INFO, webimages.JOBLIST_CONTEXTANALYSIS, webimages.JOBLIST_DLCONTEXT, webimages.JOBLIST_DLIMAGE, webimages.JOBLIST_IMAGE_FEATURES, webimages.JOBLIST_IMAGE_INFO, webimages.KEYWORDS, webimages.KEYWORDS_OLD, webimages.MN_IMAGES_KEYWORDS */ Copying 63 files... cp -p /swpr_ss02-2/frisbee/dbbackups/webimages Copying indices for 0 files... UNLOCK TABLES As you can see, the cp command is missing the source parameter... This is mysqlhotcopy version 1.14 running on a debian linux. Regards, Ralf -- - Ralf Jüngling Institut für Informatik - Lehrstuhl f. Mustererkennung Bildverarbeitung Georges-Köhler-Allee Gebäude 52 Tel: +49-(0)761-203-8215 79110 Freiburg Fax: +49-(0)761-203-8262 - - 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
help with mysqlhotcopy
I was wondering if someone could help me out with the syntax to use mysqlhotcopy to backup a database to a tape drive ( /dev/nst0 ). I've tried a few variations of the command but with no luck so far. The mysql server is running on RH 7.2 and the DAT tape drive is on that same machine. Any help would be greatly appreciated. Richard - 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
help with mysqlhotcopy
I was wondering if someone could help me out with the syntax to use mysqlhotcopy to backup a database to a tape drive ( /dev/nst0 ). I've tried a few variations of the command but with no luck so far. The mysql server is running on RH 7.2 and the DAT tape drive is on that same machine. Any help would be greatly appreciated. Richard - 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
help with mysqlhotcopy
I was wondering if someone could help me out with the syntax to use mysqlhotcopy to backup a database to a tape drive ( /dev/nst0 ). I've tried a few variations of the command but with no luck so far. The mysql server is running on RH 7.2 and the DAT tape drive is on that same machine. Any help would be greatly appreciated. Richard - 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: help with mysqlhotcopy
I was wondering if someone could help me out with the syntax to use mysqlhotcopy to backup a database to a tape drive ( /dev/nst0 ). I've tried a few variations of the command but with no luck so far. The mysql server is running on RH 7.2 and the DAT tape drive is on that same machine. Not sure if you are doing the right thing. Go to this URL, http://www.mysql.com/doc/m/y/mysqlhotcopy.html It suppose to do the backup to a folder not on a DAT tape. You can write small shell to first backup your database in a folder and second use tar command to copy the folder on your DAT tape. Hisseine - Original Message - From: Richard Reina [EMAIL PROTECTED] To: mysql [EMAIL PROTECTED] Sent: Wednesday, June 12, 2002 6:47 PM Subject: help with mysqlhotcopy I was wondering if someone could help me out with the syntax to use mysqlhotcopy to backup a database to a tape drive ( /dev/nst0 ). I've tried a few variations of the command but with no luck so far. The mysql server is running on RH 7.2 and the DAT tape drive is on that same machine. Any help would be greatly appreciated. Richard - 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
mysqlhotcopy broken ???
It appears the v4.0.1 mysqlhotcopy perl script has been modified and broken. When using cp for the backup it's passing a null value for the file(s) to be copied. Below is a session clipping of an execution with --debug turned on: # /u02/mysql/mysql-4.0.1/bin/mysqlhotcopy test_myisam --allowold --debug Using copy suffix '_copy' Filtering tables with '(?-xism:.*)' $VAR1 = [ { 'tables' = [ 'test_myisam.incidents' ], 't_regex' = '.*', 'src' = 'test_myisam', 'raid_dirs' = [], 'index' = [], 'files' = [ 'incidents.MYD', 'incidents.MYI', 'incidents.frm' ], 'target' = '/u02/mysql/data/test_myisam_copy' } ]; Existing hotcopy directory renamed to '/u02/mysql/data/test_myisam_copy_old' Locked 1 tables in 0 seconds. Flushed tables (test_myisam.incidents) in 0 seconds. Copying 3 files... Executing 'cp -p /u02/mysql/data/test_myisam_copy' cp: missing destination file Try `cp --help' for more information. Burp ('scuse me). Trying backtick execution... cp: missing destination file Try `cp --help' for more information. Copying indices for 0 files... Unlocked tables. Deleting previous copy in /u02/mysql/data/test_myisam_copy_old mysqlhotcopy copied 1 tables (3 files) in 0 seconds (0 seconds overall). Any fixes for this? Steve Orr - 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
mysqlhotcopy regexp problem with 640 and more Databases
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. The file exists though. If i create a table alphabetically before the one with the error, then the next time i use mysqlhotcopy it also produces the error on the next table alphabetically before, but always on the 640. table. Line 432 of mysqlhotcopy 1.15 is: $dbh-do(LOCK TABLES $hc_locks); Commenting that line makes the error go away. mysqlhotcopy also works fine if i use it only on the single database where the error occurs with --regexp='mydatabase.*' since there are less than 640 Tables then. How-To-Repeat: Use mysqlhotcopy 1.15 on a MySQL Server with 640 or more Tables Syntax: mysql/bin/mysqlhotcopy --regexp='.*' /somedir Fix: ? Submitter-Id: submitter ID Originator:Simon Pabst Organization: Siemens Business Services MySQL support: none Synopsis: mysqlhotcopy regexp problem with 640 and more Databases Severity: serious Priority: high Category: mysql Class: sw-bug Release: mysql-3.23.49 (Official MySQL binary) Environment: System: SunOS 5.8 Generic_108528-08 sun4u sparc SUNW,Ultra-Enterprise-1 Architecture: sun4 Some paths: /usr/bin/perl /usr/local/bin/make /usr/local/bin/gcc /usr/ucb/cc GCC: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='gcc' CFLAGS='-O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' LIBC: -rw-r--r-- 1 root bin 1749356 Jul 20 2000 /lib/libc.a lrwxrwxrwx 1 root root 11 Mar 6 2001 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1135056 Jul 20 2000 /lib/libc.so.1 -rw-r--r-- 1 root bin 1749356 Jul 20 2000 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Mar 6 2001 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1135056 Jul 20 2000 /usr/lib/libc.so.1 Configure command: ./configure --prefix=/lvol1/mysql '--with-comment=Official MySQL binary' --with-extra-charsets=complex --with-server-suffix= --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared Perl: This is perl, v5.6.1 built for sun4-solaris-multi DBI 1.20 DBD-mysql-2.1017 Sincerely Simon Pabst mailto:[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