AudiBoy
03-06-2002, 02:57 PM
Hello,
For some reason, mysqlhotcopy does not seem to like backing up our databases which are named as such, '101'. It has no problems however backing up databases which start with letters or contain only letters. Is this a real limitation? or am I simply missing something. I've tried various things, such as putting the number in qoutes, but no luck.....
this is the error message.....
Database '101' not accessible: DBD::mysql::db do failed: You have an error in your SQL syntax near '101' at line 1 at /usr/sbin/mysqlhotcopy line 239.
Thanks
Jay
serve-you
03-06-2002, 04:05 PM
This appears to be a limitation. I have never used mysqlhotcopy, but I created a test db called 12345 to try, and it failed in the same way. Why not just use mysqldump instead?
-Dan
AudiBoy
03-06-2002, 04:16 PM
Yeah, it defenitely is a strange limitation... I just wanted to make sure i wasn't the only one. Thanks for checking it out!
I thought mysqlhotcopy would be a better solution to 'dump' becuase it basically duplicates the files exactly, and i believe the files will actually be smaller than with 'dump' because you don't have all the SQL language included..
I'm going to have to take a look into the code, and see if there is a solution to this.
Anyone else already done this?
Thanks
Jay.
Originally posted by AudiBoy
Yeah, it defenitely is a strange limitation... I just wanted to make sure i wasn't the only one. Thanks for checking it out!
I thought mysqlhotcopy would be a better solution to 'dump' becuase it basically duplicates the files exactly, and i believe the files will actually be smaller than with 'dump' because you don't have all the SQL language included..
I'm going to have to take a look into the code, and see if there is a solution to this.
Anyone else already done this?
Thanks
Jay.
It is possible to remove that bug in the mysqlhotcopy file itself - it's Perl so it's quite easy to modify it.
mysqlhotcopy is a lot better than dump because:
1. You do not lock mysql for as long time as with dump.
2. You're sure that the binary data in BLOPs are preserved.
3. You get smaller files.
pmak0
03-06-2002, 07:07 PM
> 3. You get smaller files.
That's not always true. mysqlhotcopy also copies the index files. If you've got complicated data with a lot of indexes, the index themselves are pretty large, and the result will be bigger than a .sql file that you get from mysqldump.
If you wanted to save the space then you'd hack mysqlhotcopy to not copy the .MYI (index) file. Of course, this means that if you restore from backup, you need to rebuild the .MYI file using myisamchk (or maybe REPAIR TABLE; not sure if that works in this case) before using it.
serve-you
03-06-2002, 07:12 PM
You can set it to ignore indices.
-Dan