Re: mysqlhotcopy regexp
Thanks, but this not work to (output with --debug) $VAR1 = []; No tables to hot-copy at /usr/local/bin/mysqlhotcopy line 390. /usr/local/bin/mysqlhotcopy Ver 1.22 mysql-4.1.16 perl, v5.8.5 built for i586-linux-thread-multi Linux camel 2.6.8-24.16-default > You should just be doing > > mysqlhotcopy ...connect-options... --regexp /~^db_name$/ > or > mysqlhotcopy ...connect-options... --regexp /~^db_name$/ /path/to/new/dir > > On 5/25/06, MF <[EMAIL PROTECTED]> wrote: > > Hi, how to write pattern for backup all datases except one? > > > > I try this, but not work as expecting. > > mysqlhotcopy ...connect-options... --regexp /~^db_name$/./.*/ > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: mysqlhotcopy regexp
You should just be doing mysqlhotcopy ...connect-options... --regexp /~^db_name$/ or mysqlhotcopy ...connect-options... --regexp /~^db_name$/ /path/to/new/dir On 5/25/06, MF <[EMAIL PROTECTED]> wrote: Hi, how to write pattern for backup all datases except one? I try this, but not work as expecting. mysqlhotcopy ...connect-options... --regexp /~^db_name$/./.*/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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 problem with 640 and more Databases
In the last episode (Jun 05), Pabst Simon said: > Description: > > When using mysqlhotcopy 1.15 for database backups with --regexp='.*' and > having 640 or more Databases produces the following error: > > DBD::mysql::db do failed: File '/lvol1/mysql/data/mydatabase/mytable640.MYD' not >found (Errcode: 24) at ./bin/mysqlhotcopy line 432. And did you run "perror 24" to find out why the OS wouldn't let mysql open the file? $ perror 24 Error code 24: Too many open files $ Make sure the OS is configured to let mysql open lots and lots of files at once. -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
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: 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
Re: Mysqlhotcopy regexp problem
On Fri, Jul 20, 2001 at 01:25:22AM -0700, Jeremy Zawodny wrote: > > > > If I specify just one database, I still get the "deprecated" > > warning, but the hotcopy works... > > There are two bugs. > > (1) The "depricated" message. I'm submitting a patch for that. > > (2) The fact that if you specify no databases but do specify a > regexp, it doesn't do what you expect. It is unclear to me, > based on the docs for mysqlhotcopy, what it is supposed to do in > that case. But I'm leaning toward thinking that your > expectations are right. I'll put that in the patch as well. The patch against scripts/mysqlhotcopy.sh from the latest bitkeeper source tree is below my signature. I tested it using your example and it seemed to solve the problems for me. Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 <-- NEW MySQL 3.23.29: up 34 days, processed 268,910,584 queries (89/sec. avg) --- mysqlhotcopy.sh.origFri Jul 20 00:51:17 2001 +++ mysqlhotcopy.sh Fri Jul 20 02:11:06 2001 @@ -223,18 +223,27 @@ my $db = $rdb->{src}; eval { $dbh->do( "use $db" ); }; die "Database '$db' not accessible: $@" if ( $@ ); -my @dbh_tables = $dbh->func( '_ListTables' ); +my @dbh_tables = $dbh->tables(); ## generate regex for tables/files -my $t_regex = $rdb->{t_regex};## assign temporary regex -my $negated = $t_regex =~ tr/~//d;## remove and count negation operator: we don't allow ~ in table names -$t_regex = qr/$t_regex/; ## make regex string from user regex - -## filter (out) tables specified in t_regex -print "Filtering tables with '$t_regex'\n" if $opt{debug}; -@dbh_tables = ( $negated - ? grep { $_ !~ $t_regex } @dbh_tables - : grep { $_ =~ $t_regex } @dbh_tables ); +my $t_regex; +my $negated; +if ($rdb->{t_regex}) { +$t_regex = $rdb->{t_regex};## assign temporary regex +$negated = $t_regex =~ tr/~//d;## remove and count + ## negation operator: we + ## don't allow ~ in table + ## names + +$t_regex = qr/$t_regex/; ## make regex string from + ## user regex + +## filter (out) tables specified in t_regex +print "Filtering tables with '$t_regex'\n" if $opt{debug}; +@dbh_tables = ( $negated +? grep { $_ !~ $t_regex } @dbh_tables +: grep { $_ =~ $t_regex } @dbh_tables ); +} ## get list of files to copy my $db_dir = "$datadir/$db"; @@ -249,10 +258,18 @@ closedir( DBDIR ); ## filter (out) files specified in t_regex -my @db_files = ( $negated - ? grep { $db_files{$_} !~ $t_regex } keys %db_files - : grep { $db_files{$_} =~ $t_regex } keys %db_files ); +my @db_files; +if ($rdb->{t_regex}) { +@db_files = ($negated + ? grep { $db_files{$_} !~ $t_regex } keys %db_files + : grep { $db_files{$_} =~ $t_regex } keys %db_files ); +} +else { +@db_files = keys %db_files; +} + @db_files = sort @db_files; + my @index_files=(); ## remove indices unless we're told to keep them @@ -808,4 +825,8 @@ Ask Bjoern Hansen - Cleanup code to fix a few bugs and enable -w again. Emil S. Hansen - Added resetslave and resetmaster. + +Jeremy D. Zawodny - Removed depricated DBI calls. Fixed bug which +resulted in nothing being copied when a regexp was specified but no +database name(s). - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysqlhotcopy regexp problem
On Wed, Jul 18, 2001 at 09:57:00AM -0800, Chris Lott wrote: > > Using the mysqhotcopy that came with the most recent MySQL (3.23.39) > on a RedHat 7.1 box with perl 5.6.0, I am getting the following > errors when trying to back up all databases: > > mysqlhotcopy --password="foo" --allowold --regexp=".*" /usr/backups/ \ > > _ListTables is deprecated, use $dbh->tables() at > /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD/mysql.pm line 262. > Use of uninitialized value in transliteration (tr///) at > /usr/bin/mysqlhotcopy line 230. > Use of uninitialized value in regexp compilation at /usr/bin/mysqlhotcopy > line 231. > > If I specify just one database, I still get the "deprecated" > warning, but the hotcopy works... There are two bugs. (1) The "depricated" message. I'm submitting a patch for that. (2) The fact that if you specify no databases but do specify a regexp, it doesn't do what you expect. It is unclear to me, based on the docs for mysqlhotcopy, what it is supposed to do in that case. But I'm leaning toward thinking that your expectations are right. I'll put that in the patch as well. Thanks, Jeremy -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 <-- NEW MySQL 3.23.29: up 33 days, processed 264,162,097 queries (89/sec. avg) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Mysqlhotcopy regexp problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Using the mysqhotcopy that came with the most recent MySQL (3.23.39) on a RedHat 7.1 box with perl 5.6.0, I am getting the following errors when trying to back up all databases: mysqlhotcopy --password="foo" --allowold --regexp=".*" /usr/backups/ \ _ListTables is deprecated, use $dbh->tables() at /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBD/mysql.pm line 262. Use of uninitialized value in transliteration (tr///) at /usr/bin/mysqlhotcopy line 230. Use of uninitialized value in regexp compilation at /usr/bin/mysqlhotcopy line 231. If I specify just one database, I still get the "deprecated" warning, but the hotcopy works... -BEGIN PGP SIGNATURE- Version: PGP 7.0.3- signed for information authentication and security Comment: Key ID: 0x51046CFD iQA/AwUBO1XOy9aLYehRBGz9EQLiHwCZAW94JqVel00uX5FywPA9j/NOw58An1Ek LmUQkQGZAEfdFQpS4SnsJ+NR =DbwQ -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