Jump to content

WIKI Activity

Showing articles posted in for the last 365 days.

This stream auto-updates     

  1. Last week
  2. Original credit @H0zen rewritten in part by myself. Our covenant servers hold lots of user and character data, we need to make sure that is safe and one of the tasks we do is multiple daily backups to an offsite FTP server. This script is ran via cronjob and can be ran as many times a day as you like. You will need to run things like "yum install ftp" for the ftp part and have zip installed. Make sure you change the parts suck as yourbackupfilename, servername, MySQL/FTP details, the password on the zip file and the folder path "remotefolder" in the FTP transfer section. #!/bin/sh # Archive & file variables ARCHIVE=yourbackupfilename`date +"%F"` OLDARCHIVE=yourbackupfilename-`date --date '-5 days' +"%F"` FILE=servername-Realmd_`date +"%F"` FILE0=servername-ZERO-Chars_`date +"%F"` FILE1=servername-ONE-Chars_`date +"%F"` FILE2=servername-TWO-Chars_`date +"%F"` # MySQL variables DBSERVER=127.0.0.1 REALMD_DATABASE=realmd CHARACTERSS_ZERO_DATABASE=characters-classic_servername CHARACTERSS_ONE_DATABASE=characters-tbc_servername CHARACTERSS_TWO_DATABASE=characters-wotlk_servername USER=rootuser PASS=rootpassword # FTP transfer on demand connection & login details FTP_USER=ftpuser FTP_PASS=ftppass FTP_HOST=ftphostname # Remove previous .zip files if multiple daily backups are being ran echo "Checking and removing as needed old .zip files locally." rm -f $ARCHIVE.zip rm -f $OLDARCHIVE.zip # Dump MySQL database in .sql files into /root echo "Dumping .sql files to /root" mysqldump --opt --user=${USER} --password=${PASS} ${REALMD_DATABASE} > ${FILE}.sql mysqldump --opt --user=${USER} --password=${PASS} ${CHARACTERSS_ZERO_DATABASE} > ${FILE0}.sql mysqldump --opt --user=${USER} --password=${PASS} ${CHARACTERSS_ONE_DATABASE} > ${FILE1}.sql mysqldump --opt --user=${USER} --password=${PASS} ${CHARACTERSS_TWO_DATABASE} > ${FILE2}.sql echo ".sql files have been dumped to /root." # Zip dumped MySQL .sql files and password the zip file echo "Zipping dumped .sql files." zip -e -P backupfilepassword $ARCHIVE.zip $FILE.sql $FILE0.sql ${FILE1}.sql ${FILE2}.sql # Show the user the result echo "${ARCHIVE}.zip was created!" # Move the file via ftp to remote NAS echo "Initiating FTP transfer on demand." ftp -n $FTP_HOST <<END_SCRIPT quote USER $FTP_USER quote PASS $FTP_PASS cd remotefolder/remotefolder binary delete $OLDARCHIVE.zip put $ARCHIVE.zip quit END_SCRIPT # FTP transfer on demand ends # Tidy up files in the /root folder rm -f /root/*.sql echo "Clearing dumped local .sql files." Mangos Backup Cron Script.txt
  3. Earlier
  4. Hello everyone ! After setting-up your server on a Linux-based distro, you may wonder : how to let the realmd & mangosd deamons run on your server with all consoles closed ? how to automatically restart theses daemons if they crash ? hom to restart theses dameons ? ho to get access to the daemons consoles after having closed all your terminals ? Well, you are at the right place ! PREREQUISITE : The "screen" app must be installed and also "gdb" in order to correctly dump chrash data : sudo apt install screen gdb STEP 1 : Go to a folder where you would like to install the script. STEP 2 : Create a file called wowadmin.sh. Make it executable : chmod +x wowadmin.sh STEP 3 : Paste the code below in the file and change the variables "/path/to/your/realmd" and "/path/to/your/mangosd" as your real paths to realmd and mangosd : #!/bin/bash THIS_FULLPATH=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd -P)/`basename "${BASH_SOURCE[0]}"` THIS_FOLDERPATH=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd -P) APATH=/path/to/your/realmd WPATH=/path/to/your/mangosd ASRV_BIN=realmd #This usually doesnt change. TrinityCore: authserver MaNGOS: realmd ArcEmu: whocares? WSRV_BIN_ORG=mangosd #This usually doesnt change. TrinityCore: worldserver MaNGOS: mangosd ArcEmu: whocares? WSRV_BIN=mangosd WSRV_SCR=mangosd echo "run" > gdbcommands echo "shell echo -e \"\nCRASHLOG BEGIN\n\"" >> gdbcommands echo "info program" >> gdbcommands echo "shell echo -e \"\nBACKTRACE\n\"" >> gdbcommands echo "bt" >> gdbcommands echo "shell echo -e \"\nBACKTRACE FULL\n\"" >> gdbcommands echo "bt full" >> gdbcommands echo "shell echo -e \"\nTHREADS\n\"" >> gdbcommands echo "info threads" >> gdbcommands echo "shell echo -e \"\nTHREADS BACKTRACE\n\"" >> gdbcommands echo "thread apply all bt full" >> gdbcommands DEBUG=false #WORLD FUNCTIONS startWorld() { if [ "$(screen -ls | grep $WSRV_SCR)" ] then echo $WSRV_BIN is already running else cd $WPATH screen -AmdS $WSRV_SCR $THIS_FULLPATH $WSRV_BIN $DEBUG echo $WSRV_BIN is alive fi } restartWorld() { screen -S $WSRV_SCR -X stuff "saveall$(printf \\r)" echo saved all characters, and server restart initialized screen -S $WSRV_SCR -X stuff "server restart 5$(printf \\r)" } stopWorld() { screen -S $WSRV_SCR -X stuff "saveall " echo saveall sent, waiting 5 seconds to kill $WSRV_BIN sleep 5 screen -S $WSRV_SCR -X kill &>/dev/null echo $WSRV_BIN is dead } monitorWorld() { echo press ctrl+a+d to detach from the server without shutting it down sleep 5 screen -r $WSRV_SCR } #AUTH FUNCTIONS startAuth() { if [ "$(screen -ls | grep $ASRV_BIN)" ] then echo $ASRV_BIN is already running else cd $APATH screen -AmdS $ASRV_BIN $THIS_FULLPATH $ASRV_BIN echo $ASRV_BIN is alive fi } stopAuth() { screen -S $ASRV_BIN -X kill &>/dev/null echo $ASRV_BIN is dead } restartAuth() { stopAuth startAuth echo $ASRV_BIN restarted } monitorAuth() { echo press ctrl+a+d to detach from the server without shutting it down sleep 5 screen -r $ASRV_BIN } #FUNCTION SELECTION case "$1" in $WSRV_BIN ) if [ "$2" == "true" ] then while x=1; do gdb $WPATH/$WSRV_BIN --batch -x gdbcommands | tee current NOW=$(date +"%s-%d-%m-%Y") mkdir -p $THIS_FOLDERPATH/crashes mv current $THIS_FOLDERPATH/crashes/$NOW.log &>/dev/null killall -9 $WSRV_BIN echo $NOW $WSRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log echo crashlog available at: $THIS_FOLDERPATH/crashes/$NOW.log sleep 1 done else while x=1; do ./$WSRV_BIN NOW=$(date +"%s-%d-%m-%Y") echo $NOW $WSRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log sleep 1 done fi ;; $ASRV_BIN ) while x=1; do ./$ASRV_BIN NOW=$(date +"%s-%d-%m-%Y") echo $NOW $ASRV_BIN stopped, restarting! | tee -a $THIS_FULLPATH.log sleep 1 done ;; "wstart" ) startWorld ;; "wdstart" ) DEBUG=true startWorld ;; "wrestart" ) restartWorld ;; "wstop" ) stopWorld ;; "wmonitor" ) monitorWorld ;; "astart" ) startAuth ;; "arestart" ) restartAuth ;; "astop" ) stopAuth ;; "amonitor" ) monitorAuth ;; "start" ) startWorld startAuth ;; "stop" ) stopWorld stopAuth ;; "restart" ) restartWorld restartAuth ;; * ) echo Your argument is invalid echo "usage: start | stop | restart | wstart | wdstart | wrestart | wstop | wmonitor | astart | arestart | astop | amonitor" exit 1 ;; esac USAGE : You can use the script with its options like : ./wowadmin.sh start Available options are : start : Starts realmd and mangosd - in a screened process. stop : Stops realmd and mangosd - in a screened process. restart : Retarts realmd and mangosd - in a screened process. wstart : Starts only mangosd - in a screened process. wdstart : Starts only mangosd in DEBUG mode - in a screened process. wrestart : Restarts only mangosd - in a screened process wstop : Stops mangosd - screened process. wmonitor : Brings back the mangosd console from the screened process (press "Ctrl+A+D" to re-detach it). astart : Starts only realmd - in a screened process. arestart : Restarts only realmd - in a screened process. astop : Stops only realmd - in a screened process. amonitor : Brings back the realmd console (press "Ctrl+A+D" to re-detach it). Moreover, when there is a crash, the daemons will auto-restart dans there will be a crashlog dumped in "crashes" directory next to your deamons executable binaries. For your information, you can see the screened processes by typing : screen -ls You can use multiple wowadmin.sh files if you manage multiple realms but the more simple would be to add specific options in the same script for your differents mangosd dameons as there could be only 1 realmd daemon running and many mangosd daemons running. Source : adapted from Lillecarl Gist
  5. Please provide the Distribution related to this topic since there is no firewall-cmd command in Debian 9 for example.
  6. Hi there. Since language translation automation is very nice since few years, it would rather be more quick to let a bot parse some bulk 'todo' strings. and then just have to "review" the translation I will have a try with French missing translations
  7. No, sorry. But from what i heard, it's pretty similar to mysql so try following the same things. Otherwise, i'm sure the forums will be able to help you
  8. Do you have any instructions on how to manually install Mangos using MariaDB ?
  9. cloudoo

    How to use EasyBuild

    yeah,i fix it , i resetup 64 bit openssl.Thank you Natrist!!
  10. Natrist

    How to use EasyBuild

    I haven't looked up the error code, but if I recall correctly it means there's a 32-bit/64-bit conflict in your application. You may be calling 64-bit libraries from your 32-bit compiled program or vice-versa.
  11. cloudoo

    How to use EasyBuild

    i'v already setup vcredist2015, may be miss some dll file?
  12. cloudoo

    How to use EasyBuild

    $ git log commit ac6d83f9ba4234936546b583761ce56391612d21 Author: H0zen <[email protected]> Date: Sun Jun 16 16:44:19 2019 +0300 Fixed some annoyances - CONF_INSTALL_DIR is no longer hardcoded, except for the case when it's explicitely specified via -D in cmake - extractor scripts are now copied in tools directory - fixed some changes in ACE which made servers crash in FreeBSD commit 03e2f858201a96ee0d78b979679bd586b1bade86 Merge: a521df1 f6fc8b6 Author: Foereaper <[email protected]eply.github.com> Date: Sat Jun 1 18:20:07 2019 +0200 Merge pull request #76 from ValeTheVioletMote/ValeTheVioletMote-rolling-fix Segmentation Fault on Bot Loot Rolling - Fix commit f6fc8b65555153efbe450174b511233406a504a9 Author: Vale the Violet Mote <[email protected]> Date: Sat Jun 1 11:51:07 2019 -0400 :...skipping... commit ac6d83f9ba4234936546b583761ce56391612d21 Author: H0zen <[email protected]> Date: Sun Jun 16 16:44:19 2019 +0300 Fixed some annoyances - CONF_INSTALL_DIR is no longer hardcoded, except for the case when it's explicitely specified via -D in cmake - extractor scripts are now copied in tools directory ...skipping... commit ac6d83f9ba4234936546b583761ce56391612d21 Author: H0zen <[email protected]>79679bd586b1bade86 Date: Sun Jun 16 16:44:19 2019 +0300 Author: Foereaper <[email protected]> Fixed some annoyances7 2019 +0200
  13. onixiya

    How to use EasyBuild

    Still doesn't answer the question, type this in the root directory of the source code git log Paste whatever comes up in the commit field
  14. cloudoo

    How to use EasyBuild

    i'v installed mysql 5.7.14 32bit version,but check is not right ,I can't select win32 model to build... how can i fix it ?
  15. cloudoo

    How to use EasyBuild

    mangosZero master branch
  16. onixiya

    How to use EasyBuild

    What git revision is your source code? Or when did you clone it?
  17. cloudoo

    How to use EasyBuild

    vs2015 ,i get some error, why? :\01_project\10_mangos\server\src\tools\Extractor_projects\vmap-extractor\vmapexport.cpp(396): warning C4459: declaration of 'preciseVectorData' hides global declaration [D:\01_project\10_mangos\server_build\src\tools\Extractor_projects\vmap-extractor.vcxproj] D:\01_project\10_mangos\server\src\tools\Extractor_projects\vmap-extractor\vmapexport.cpp(81): note: see declaration of 'preciseVectorData' TileThreadPool.cpp VMapExtensions.cpp ExtractorCommon.cpp shared.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol mysql_server_init referenced in function "public: __cdecl DatabaseMysql::DatabaseMysql(void)" ([email protected]@[email protected]) [D:\01_project\10_mangos\server_build\src\realmd\realmd.vcxproj] shared.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol mysql_server_end referenced in function "public: virtual __cdecl DatabaseMysql::~DatabaseMysql(void)" ([email protected]@[email protected]) [D:\01_project\10_mangos\server_build\src\realmd\realmd.vcxproj] shared.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol mysql_thread_init referenced in function "public: virtual void __cdecl DatabaseMysql::ThreadStart(void)" ([email protected]@@UEAAXXZ) [D:\01_project\10_mangos\server_build\src\realmd\realmd.vcxproj] shared.lib(SqlDelayThread.obj) : error LNK2001: unresolved external symbol mysql_thread_init [D:\01_project\10_mangos\server_build\src\realmd\realmd.vcxproj] shared.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol mysql_thread_end referenced in function "public: virtual void __cdecl DatabaseMysql::ThreadEnd(void)" ([email protected]@@UEAAXXZ) [D:\01_project\10_mangos\server_build\src\realmd\realmd.vcxproj]
  18. onixiya

    How to use EasyBuild

    Do you have the vcredist for whatever vs you built with? Like if you built it with vs15, do you have vcredist 2015?
  19. cloudoo

    How to use EasyBuild

    it's build success,but failed run realmd.exe or mango.exe . it's throw 0xc000007b error. how can i fix it ?
  20. antz

    How to use EasyBuild

    I have added a spaces check in the new version of easybuild currently in testing. - Hopefully it will ready soon
  21. It's simple really, just create a GitHub user and password, then use them. GitHub are tightening their security up all the time.
  22. Thats because the develop21 branch no longer exists, just clone the master branch. - I have updated the above docs to try and cover the changes.
  23. Hi, when i use the line with develop21 it says it cannot find the upstream. What does that mean?
  24. onixiya

    How to use EasyBuild

    Easybuild is found in the mangos server folder. It should be in server\win
  25. I don't understand. Where do you download easy build? I cant find a link anywhere..
  26. @shiva omizu any other suggestions the un/ps you stated isn't working for me I can really use some help
  27. pepper10100

    Installing OpenSSL

    I found that working on other problems now haha. Thanks for the prompt reply
  1. Load more activity

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×
×
  • Create New...