Go Back   EQEmulator Home > EQEmulator Forums > General > General::Server Discussion

General::Server Discussion Discussion about emulator servers.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 05-13-2018, 02:08 AM
Anon.GM's Avatar
Anon.GM
Fire Beetle
 
Join Date: Apr 2018
Posts: 19
Default

One thing I don't see much on is backups. I have this bat file running twice a day. Use Windows tasks if your running a Windows server to schedule the bat file to run. It uses 7 zip to compress the files so you need that installed too.

Code:
@echo off

 set dbUser=root
 set dbPassword=eqemu
 set backupDir="C:\EQEmuServer\backups\"
 set mysqldump="C:\Program Files\MariaDB 10.0\bin\mysqldump.exe"
 set mysqlDataDir="C:\Program Files\MariaDB 10.0\data"
 set zip="c:\Program Files\7-Zip\7z.exe"

  :: get date
 for /F "tokens=2-4 delims=/ " %%i in ('date /t') do (
      set yy=%%i
      set mon=%%j
      set dd=%%k
 )

 :: get time
 for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do (
      set hh=%%i
      set min=%%j
 )

 echo dirName=%yy%%mon%%dd%_%hh%%min%
 set dirName=%yy%%mon%%dd%_%hh%%min%
 
 :: switch to the "data" folder
 pushd %mysqlDataDir%

 :: iterate over the folder structure in the "data" folder to get the databases
 for /d %%f in (*) do (

 if not exist %backupDir%\%dirName%\ (
      mkdir %backupDir%\%dirName%
 )

 %mysqldump% --host="localhost" --user=%dbUser% --password=%dbPassword% --max_allowed_packet=512M --routines %%f > %backupDir%\%dirName%\%%f.sql

 %zip% a -tgzip %backupDir%\%dirName%\%%f.sql.gz %backupDir%\%dirName%\%%f.sql

 del %backupDir%\%dirName%\%%f.sql
 )
 popd
I'm not sure what level of help you need so I'm just posting what I have. Also passwords may need to be changed if your using anything outside the standard.
__________________
email:anon.gm@protonmail.com
servers: Anon (bots) and Anon (solo)
Reply With Quote
 


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 05:20 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3