Hi there,

I have been attempting to use mysqlhotcopy to make a backup
copy of all of the databases on a server.  It wasn't completely 
self-evident from the Mysql manual how best to do this, so I 
tried the following:

mysqlhotcopy -u blah -p blah "--regexp=.*" --flushlog /blah/blah/blah/destdir

This resulted in the following error messages:

Use of uninitialized value in transliteration (tr///) at 
/usr/local/mysql/bin/mysqlhotcopy line 230.
Use of uninitialized value in regexp compilation at /usr/local/mysql/bin/mysqlhotcopy 
line 231.
Filtering tables with '(?-xism:)'
Use of uninitialized value in transliteration (tr///) at 
/usr/local/mysql/bin/mysqlhotcopy line 230.
[similar stuff repeated many times ...]
No tables to hot-copy at /usr/local/mysql/bin/mysqlhotcopy line 322.

I found that the following patch solves the problem:

diff -c mysqlhotcopy.orig mysqlhotcopy 
*** mysqlhotcopy.orig   Sun Nov  4 18:03:49 2001
--- mysqlhotcopy        Sun Nov  4 17:53:35 2001
***************
*** 227,232 ****
--- 227,233 ----
 
      ## generate regex for tables/files
      my $t_regex = $rdb->{t_regex};        ## assign temporary regex
+     $t_regex = ".*" if !defined $rdb->{t_regex}; ## MTC 2001.11.04
      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
                                                                                   

This occurred using MySQL 3.23.37 with Linux 2.4.0.  I hope
this is of use to someone.  If this is not the preferred method
for making a copy of a database, I would be grateful for
enlightenment.

Thanks.


-- 
Matthew Clegg               |  OKbridge -- The #1 Online Bridge Club
[EMAIL PROTECTED]           |  http://www.okbridge.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 <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to