Manual Upgrade

This page is for people who already know where and how to get L2J Server files. If You don't, go to L2JServer Wiki.

Source Code Upgrade Compiled Server Upgrade Database Upgrade If You use only already compiled server packs (Nightlies), You don't need to read SVN section of this page. --

SVN
Warning: IF You have any custom code applied or You have edited the existing code, You must follow the Synchronization guide. To upgrade source code, You must first open Eclipse (other programs may differ in the following steps, but it shouldn't be that much). After it is loaded, right-click Your project folder (normally L2_GameServer or datapack_development) in Project Explorer view and choose Team>Update to Head. This might/will take a while if You haven't done it for a long time or if You have a slow/laggy internet connection. After the files are updated successfully, right click on each project's Build.xml file and choose Run As>Ant Build. After that just wait until it compiles, then You can close Eclipse. When ready, go to Your workspace folder (by default C:\%user data%\%username%\workspace), and collect .zip archives from Your projects' \build folders.

--

Server
After You have downloaded/compiled the L2J Server/Datapack files, You must extract them somewhere to be able to use them. DON'T EXTRACT THEM ON DESKTOP! Only kids do that. After You have extracted the server files, check if the folders are where they should be, e.i. the folders in C:\server should be: You MUST extract both L2J_Server.zip and L2J_DataPack.zip in one folder (it might ask to overwrite folders, confirm) After You have the extracted files, make a backup copy of any changed files from Your current server build (if You haven't done it in source or any other way). This includes custom quests/events/htms/multisells/geodata+pathnodes,and lastly, configs. Overwriting config files can have bad consequences if there have been changes in them and Your configs don't contain a certain variable or have a wrong value for it, so don't ever overwrite them, only keep them to read previous settings. It's best that You manually reconfigure the configs after You update the files. When the backup is made, either delete the old server files or copy over the new ones. It should ask to overwrite, if it doesn'tm, You better check if the folders match. After the files are updated, put Your quests/events/htms/multisells etc. back in place (of course, that includes adding the quests to scripts.cfg file in gameserver\data directory). That should be all for file updating, but if any errors occur, first try to resolve them Yourself, and only if You can't in any way figure out where the problem is, search | Our forums for a solution or create a topic in the corresponding support area. Now You must change the configuration files, if You haven't already done so in source files. The Configuration Settings page will give You more information on that. After You have set up the configs correctly (or atleast so You think), we can start by upgrading the Database.
 * cb_sql
 * community
 * doc
 * gameserver
 * images
 * languages
 * libs
 * login
 * sql
 * tools

Database
Warning!! In order to escape any future problems, I strongly recommend You to make a full backup of Your database tables. How You do that is up to You, I use MySQL Administrator for that, but it seems they have stopped developing that tool and moved on to something new, so I guess I won't be able to recommend anything much. (subject of change) When You have made the database backup, go to C:\server\tools (or w/e other folder You have there) and run database_installer.bat/.sh (further on it should be fairly similar on both Windows and Linux) If all is well (that is, MySQL service is running, all configs are correct), it should prompt You to write Your path to MySQL binaries. You can, for future use, make a quick shortcut for this step by defining the PATH variable Yourself. In Windows this is done by right-clicking My Computer, choosing Properties, tab Advanced, and at the bottom of the tab will be a button Environment Variables. If there is no such PATH variable in User variables, click New and name it PATH, and in value type in/copy the directory of MySQL bin folder (for me it's C:\Program Files\MySQL\MySQL Server 5.1\bin). If there is a PATH variable, but it points to another folder, add a semicolon and add the MySQL bin directory after it. This should make the database_installer.bat/.sh recognize the PATH automatically and not require You to manually enter it. Now, after You have entered/found the MySQL bin path, click Enter. Now it will ask You for Your Login Server database information, such as login, password, database name and host. IF Login Server is hosted on a different PC, You will need to skip this step, as this tool does not support database installation over network. After comes the Community Server settings, which are same as Login Server, in the means of information asked. IF Community Server will not be used OR is hosted on a different PC, skip this step for the same reasons explained above. Next and final is Game Server settings, which by default are set to be the same as Login Server (most users have only 1 PC for server hosting). Again, skip if necassary. Then comes the trivial settings like Color mode, backup directory (default is the \tools folder where the database_installer.bat/.sh resides), log file directory (same as before), and debugging setting (default true, recommended). when all is set up, the installer will save all Your settings in a file called vars.txt, and save it in \tools folder. "Press any key to continue..." You know, which button it is, don't You? :D The tool will try to backup Your Login Server Database. If there is none, it will ask to either quit, skip, reconfigure settings or create the database. If You are sure that Your database exists and it contains data, You should recheck the settings You defined earlier. You can just quit the tool and check the vars.txt file in \tools folder, correct it if anything is wrong and run it again, it will go back to the Login Server database backup step automatically. If the problem persists, search | Our forums for a solution or create a topic in support area. If the tool doesn't find the database and You don't even need it to, choose NO to skip to Community Server part. If it does, but You still don't need it, choose SKIP. If it does, but You don't want to erase information about 'accounts' and 'gameservers', again, choose SKIP. Now, after You have installed/skipped the Login Server database, comes the Community Server. The options are the same, I chose skip as I have enough with the built-in Community Board. Next is the Game Server. This time it allows You to either do a FULL INSTALL (deletes all and everything) or UPGRADE(tries to keep character data, and should do so fairly well, but that's what the backup is for, You know?). If Game Server is not hosted on this PC, You can skip to updates part. After Game Server database installation it will offer You to install custom database tables (Really useful if You have any custom NPCs, shops or spawns, OR more), and Wedding tables (only needed for Wedding mod, not many use this). Choose what You need. And finally, the updates. This part contains mostly database table changes, also some static data changes. I personally recommend doing this (In any case, You still have Your backup). After all is done, You can check the \tools for errors.txt and custom_errors.txt files and read them. My custom_errors.txt file is always empty. The errors.txt file, however, usually contains several types of errors.
 * Cant drop xxx; check that column/key exists - an update was supposed to drop a column/key, You had a later version of database where this was already done, so the update failed. Usually nothing to worry about.
 * Duplicate column name xxx - similar as above, an update was supposed to create a column, but database was newer and it wasn't necassary.
 * Unknown column xxx in xxx - one update had removed a column which another update was supposed to change (the fail to delete error is the first one).

I don't get any other errors in there, but if You do, You might want to check up on them, compare the database versions, maybe something has gone wrong.