View Single Post
  #12  
Old 05-01-2019, 10:22 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

When compiling the source, all you're doing is creating the binaries that run the server, without any direct effect on your database. You would simply be copying the new updated binaries into your server folder, overwiting the old ones. Then when you start your server up again, it will connect to the same peq, that you already have.

When you run the update script (eqemu_server.pl), it will recognize the version of the new binaries you compiled and make adjustments, if you wish to keep your server up to date. Here's an example: If your database was db_version 9136 today, and you ran the updates, after compiling new binaries, it would make adjustments to your database and set the db_version to 9139. (That db_version is a table in your peq database). Compiling updated source code, does not install a new database, the source code and the peq are two seperate things. The maps, the quests, the plugins, etc., are all seperate from each other, they simply all come together when you start your server up, but none of it gets altered, unless you allow it to, or choose to alter it yourself.

But a word of caution, (using the above example), An update was done to the source code which will use a slightly different faction schema/values. That update will also add new faction tables to your peq database, when you first run world.exe and will also make adjustments to quests in your quest folder, unless you opt out of it in the variables table in the database.

Updates are not a bad thing, the developers are constantly making adjustments to make things a little more on the correct side of values, etc. The only time updated source code will cause a problem, is maybe with a heavily customized server that someone has been doing all their own coding on, and one particular update might screw something up that they have done already. It's a good idea to keep an eye on the source code updates on the github, as well as the changelog. I use git pull to constantly pull updated source code from git hub, after reading the updates they do.

Something you can do, as far as having more than one peq database, for example, you can create a new one, called peqtwo (or whatever name you give it, without deleting your old database. Once you create that new one, it will be empty, but then you can opt to source in a backup of a database into it. The only thing you would have to do to run that new database, is go into your server folder and change the config files to all point to that new one (peqtwo), instead of the old one. But then if you wanted to go back to the old one, you would have to change the configs again. This is why I keep a seperate server folder for a test server, so I don't have to do that. I just simply copied the whole contents of the eqemu server folder into a new one and called it eqemutest. As long as you run the start script from the new server folder, then it will run the test peq database.

I do a lot of backups and running sql files in a dos(command window) The following, I put in a batch file (backup.bat) in a folder I created called peqbackup which backs up my entire database. (I have a shortcut on the desktop)
mysqldump --routines -u root -ppassword peq > peq_backup.sql

Usually what i do myself when manually creating a new database, First, I use navicat to access and edit the database in mysql. I create a new database with that, then I open a dos (cmd prompt window), cd.. to the folder where the sql is and then log into the mysql. I don't use Mariahdb, but I assume it's the same. This example below, I am logging into the mysql, and choosing to use the new database (peqtest) and then sourcing in the peq backup database dump:
>mysql -u root -ppassword
mysql> use peqtest <---IMPORTANT to tell mysql which database to use!!
mysql> source peq_backup.sql;

This does not get rid of your old peq database, it will still be there unless you decide to delete it. This example simply creates a second one. You could probably create hoards of new databases and keep them all, but you would only be using one at a time. It's the same with your main server folder where the binaries, maps, quest, etc. all are. You could have as many of those folders, as your hard drive could hold. I keep a fresh, vanilla test database, untouched, and run all updates when they are released. It comes in handy once in awhile.

By the way, you can also download the most current updated peq here: http://edit.peqtgc.com/weekly/peq_beta.zip (same updates as the peqtgc server)
There is a few files in there, but you only need to source in the peqbeta, player_tables and load_login (edit the load_login first, for user info)

You can also keep an eye on the changelog, to see what's been done with the peq: http://peqtgc.com/forums/index.php?f...change-log.80/

The updates to source code can be found here: https://github.com/EQEmu/Server

And of course, lots of info on the wiki here: https://github.com/EQEmu/Server/wiki
Reply With Quote