Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2010, 01:05 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default Bot SQL causes database restore to fail

Please see this thread I created in the linux support section for all the details:

http://www.eqemulator.org/forums/showthread.php?t=30795

I have traced the issue back to the bot tables, but not sure where to go from there with it.

Currently it seems that one cannot use mysqldump to backup a bot enabled server, and expect to be able to restore that backup. It always fails with the following error:

ERROR 1305 (42000) at line 4923: FUNCTION eqtest.GetMobTypeByName does not exist
Reply With Quote
  #2  
Old 03-14-2010, 01:11 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

Steps to take to confirm the issue:

1. create a new db called eqtest
2. source in peq db rev 1265 or any rev for that matter
3. source in load_players.sql
4. source in load_bots.sql
5. mysqldump -uroot -pROOTPASS --opt eqtest > eqtest.sql
6. delete the database eqtest
7. recreate the eqtest database
8. mysql -u root -p -D eqtest < eqtest.sql
9. get error mentioned above

try whole thing over but do not source in load_bots.sql and it will restore fine.

NOTE:

You will need to see this thread in order to source in load_bots.sql in the first step, since the file is wrong and does not work without an edit:

http://www.projecteq.net/phpBB2/viewtopic.php?t=9833
Reply With Quote
  #3  
Old 03-14-2010, 02:55 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

Your mysqldump command needs the -R switch to pick up the methods.
I think that method is no longer used anyway.
Get the latest sql files as some have been updated.

load_bots.sql should be:
Code:
source player_tables/botguildmembers.sql; 
source player_tables/bots.sql; 
source player_tables/botpetstatepersists.sql; 
source player_tables/botinventory.sql; 
source player_tables/botbuffs.sql; 
source player_tables/botadventuring.sql; 
source player_tables/botgroups.sql;
use this:
Code:
DROP DATABASE IF EXISTS eqtest;
CREATE DATABASE eqtest;
USE eqtest;
source peqdb_rev1265.sql;
source load_player.sql;
source load_bots.sql;
Then try your test using the -R switch with mysqldump.

Last edited by Congdar; 03-14-2010 at 03:04 PM..
Reply With Quote
  #4  
Old 03-14-2010, 03:11 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

That worked perfectly, thanks! Now I just need to fix my other issue over here http://www.eqemulator.org/forums/showthread.php?t=30809 and I will have a working server again!
Reply With Quote
  #5  
Old 03-16-2010, 08:11 AM
Eva Aisling
Sarnak
 
Join Date: Feb 2010
Posts: 49
Default

Quote:
Originally Posted by Congdar View Post
Your mysqldump command needs the -R switch to pick up the methods.
Pardon my ignorance, but how do I do this? I am using the most recent sql files and recently had this error on my Windows server. Is there a way to fully restore my database after a failed restore? I have all my characters, but bots work improperly.
Reply With Quote
  #6  
Old 03-16-2010, 09:29 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

if you didn't use the -R switch then your backup didn't get the methods. If you go back to the original bot sql files you could probably find the commands that create the methods you are missing.
Reply With Quote
  #7  
Old 04-19-2011, 07:59 PM
Grebbin
Sarnak
 
Join Date: Apr 2011
Posts: 32
Default Clarification...

I Have a batch file that reads like this timed to run every 24 hours. I also have bots enabled.

@echo off
Echo Please wait while the peq database is backed up as 'L:\peq_backup.sql' ...
mysqldump -uroot -pfiriona peq > l:\peq_backup.sql

You said...

"Your mysqldump command needs the -R switch to pick up the methods."

So what would the full context be? I'd like to have an auto db backup to my memory stick so I can roll back the server in case of emergency. Would it be:

mysqldump -uroot -pfiriona peq > l:\peq_backup.sql -R ???
I'm an SQL NEWB! Thanks!
Reply With Quote
  #8  
Old 04-19-2011, 09:53 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Try mysqldump -R -uroot -pfiriona peq > l:\peq_backup.sql
Reply With Quote
  #9  
Old 04-19-2011, 10:39 PM
Grebbin
Sarnak
 
Join Date: Apr 2011
Posts: 32
Default

Thanks! I'll try that!
Reply With Quote
  #10  
Old 05-18-2011, 11:19 PM
initium
Fire Beetle
 
Join Date: Apr 2011
Posts: 12
Default

Quote:
Originally Posted by Grebbin View Post
I Have a batch file that reads like this timed to run every 24 hours. I also have bots enabled.

@echo off
Echo Please wait while the peq database is backed up as 'L:\peq_backup.sql' ...
mysqldump -uroot -p******* peq > l:\peq_backup.sql

You said...

"Your mysqldump command needs the -R switch to pick up the methods."

So what would the full context be? I'd like to have an auto db backup to my memory stick so I can roll back the server in case of emergency. Would it be:

mysqldump -uroot -p****** peq > l:\peq_backup.sql -R ???
I'm an SQL NEWB! Thanks!
It may not matter, but your password is showing. Maybe you already changed it when you posted, but I thought I'd alert you just in case.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:37 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3