Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2009, 03:02 PM
nosfentora
Discordant
 
Join Date: Oct 2004
Location: In a house
Posts: 377
Default Updated Bot Backup Batch File

Here's an updated .bat file to save *all* the bot info when doing a backup

Code:
@echo off
cls
REM Change these variables to suit your setup

REM the name of your database
set db=peq

REM the ip of your MySQL server, leave as is if local
REM -h prefix is needed if remote
set ip=-h127.0.0.1

REM Your database password, leave blank to enter manually
set pass=changeme

REM the folder to backup to (created in the current folder), set to . to not create a folder
set backupdir=bot_backup
REM the name of the bot backup file to create
set backupfile=bot_npcs.sql

echo **************************************
echo ***        Backing up Bots         ***
echo **************************************
if backupdir==. goto :end
dir .\ /a:d | find /i "%backupdir%" > nul
if errorlevel 1 goto notfound
goto :end
:notfound
md %backupdir%
:end
echo *** Dumping Bots from NPC_Types... ***
mysqldump -u root -p%pass% %ip% "--where=id in (select botnpctypeid from botsowners)" -x -t %db% npc_types > %backupdir%\%backupfile%
echo *** Dumping Bot Groups...          ***
mysqldump -u root -p%pass% %ip% -x -t %db% botgroups >> %backupdir%\%backupfile%
echo *** Dumping Bot Inventory...       ***
mysqldump -u root -p%pass% %ip% -x -t %db% botinventory >> %backupdir%\%backupfile%
echo *** Dumping Bot Leader...          ***
mysqldump -u root -p%pass% %ip% -x -t %db% botleader >> %backupdir%\%backupfile%
echo *** Dumping Bots Owners...         ***
mysqldump -u root -p%pass% %ip% -x -t %db% botsowners >> %backupdir%\%backupfile%
echo ***          Done dumping!         ***
echo **************************************
echo To re-source the bots source '%backupdir%\%backupfile%'
pause
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:04 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