Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Page 1 of 2 12 LastLast
Results 1 to 15 of 82

Hybrid View

  1. #1
    Join Date
    December 2009
    Location
    Hungary
    Posts
    162

    [Mini tutorial] How to upgrade your server

    Edit by mod
    This tuto is for an old version. Don't use the sql part.


    I just made a multiplatform server upgrade tutorial for people who are still scratching their heads about upgrading the server. If you spot any problems or have any feedback, feel free to post.
    Last edited by florian_fr40; October 25th, 2011 at 10:46 AM.

  2. #2
    Join Date
    December 2009
    Location
    US
    Posts
    29
    Thank you for this but I have a couple questions...

    The file I have is named ts3server.sqlitedb not what you wrote... Same thing I am assuming?

    Second; When I go to close the program it asks me if I want to save the file. Should I or do I not need to?

  3. #3
    Join Date
    December 2009
    Location
    Hungary
    Posts
    162
    Yeah, that was just a mistype on my part. Thanks for pointing it out, I fixed it.

    Saving the file at the end is not necessary, it's just a backup action. Then again, just to be sure, check the file modification date to see if it got changed or not.
    Last edited by MoXNoX; December 24th, 2009 at 04:05 AM.

  4. #4
    Join Date
    December 2009
    Location
    Vancouver, BC
    Posts
    89
    What about those of us using MySQL databases and not the SQLite db?

  5. #5
    Join Date
    December 2009
    Location
    Hungary
    Posts
    162
    As I wrote in the tutorial, use your favorite MySQL tool, like the query window of phpmyadmin.

  6. #6
    Join Date
    December 2009
    Location
    North Carolina
    Posts
    1
    Maybe I missed something but is this tutorial addressing going from the release 2.x version of the server (and database schema) to the beta 3.x version of the server (with the database changes you mentione (i.e. multiple inserts)).

  7. #7
    Join Date
    August 2005
    Location
    Clifton Park, NY
    Posts
    5
    I was looking in to this as well. Thank your for posting your queries. It got me pointed in the right direction, but I think that the queries listed are incomplete. I modified your approach a little by pulling a complete Diff of the SQL folders in beta1 and beta9. I found that the defaults.sql was the only relevant difference (there is also a change to a sql query that is used by TS3 internally, but that isn't relevant here). I have put together an update script that should be all inclusive of the beta1 to beta9 changes. I wrote it so that it will only update or delete default permissions that were configured by TS3's initialization. If you have altered a permission since installation, that permission will not be altered.

    My procedure:
    1) Extract the SQL folder from the old and new version ZIP files.
    2) Use a tool like Total Commander or some other utlitity that can compare files by content to identify the files that are different between the two folders. Alternatly, you can skip this step and step 3 and simply check defaults.sql as it is the only file I have seen change yet. This may not catch all changes in the future though.
    3) Check if files contain :id1: kinds of fields, these files can be ignored as these appear to be queries used by TS3 internally.
    4) Use a diff utility like P4Merge to analyse the differences between each set of files. If a line is new, keep the insert, if a line is removed, modify it to a delete, if the line is changed, check for the differences and change it to an UPDATE to the values in the new line WHERE the values match the old.
    5)Apply this update script to your DB and enjoy.

    Queries (beta1 to beta9):
    Code:
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value,perm_negated, perm_skip) values (0, 2, 0, "b_client_issue_client_query_command", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value,perm_negated, perm_skip) values (0, 2, 0, "b_virtualserver_modify_log_settings", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value,perm_negated, perm_skip) values (0, 2, 0, "b_virtualserver_modify_priority_speaker_dimm_modificator", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value,perm_negated, perm_skip) values (0, 2, 0, "i_needed_modify_power_client_issue_client_query_command", 100, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value,perm_negated, perm_skip) values (0, 2, 0, "i_needed_modify_power_virtualserver_modify_log_settings", 100, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value,perm_negated, perm_skip) values (0, 2, 0, "i_needed_modify_power_virtualserver_modify_priority_speaker_dimm_modificator", 100, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_client_issue_client_query_command", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_virtualserver_modify_autostart", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_virtualserver_modify_ft_quotas", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_virtualserver_modify_ft_settings", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_virtualserver_modify_hostbutton", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_virtualserver_modify_log_settings", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_virtualserver_modify_maxclients", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_virtualserver_modify_port", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "b_virtualserver_modify_priority_speaker_dimm_modificator", 1, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "i_needed_modify_power_client_issue_client_query_command", 75, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "i_needed_modify_power_virtualserver_modify_log_settings", 75, 0, 0);
    insert into perm_server_group (server_id, id1, id2, perm_id, perm_value, perm_negated, perm_skip) values (0, 3, 0, "i_needed_modify_power_virtualserver_modify_priority_speaker_dimm_modificator", 75, 0, 0);
    delete from perm_server_group where server_id=0 and id1=4 and id2=0 and perm_id='b_client_ban_list' and perm_value = 1 and perm_negated = 0 and perm_skip = 0;
    delete from perm_server_group where server_id=0 and id1=4 and id2=0 and perm_id='b_client_complain_list' and perm_value = 1 and perm_negated = 0 and perm_skip = 0;
    delete from perm_server_group where server_id=0 and id1=5 and id2=0 and perm_id='b_client_ban_list' and perm_value = 1 and perm_negated = 0 and perm_skip = 0;
    delete from perm_server_group where server_id=0 and id1=5 and id2=0 and perm_id='b_client_complain_list' and perm_value = 1 and perm_negated = 0 and perm_skip = 0;
    update perm_server_group set perm_value=75 where server_id=0 and id1=3 and id2=0 and perm_id='i_needed_modify_power_virtualserver_modify_autostart' and perm_value=100 and perm_negated=0 and perm_skip=0
    update perm_server_group set perm_value=75 where server_id=0 and id1=3 and id2=0 and perm_id='i_needed_modify_power_virtualserver_modify_ft_quotas' and perm_value=100 and perm_negated=0 and perm_skip=0
    update perm_server_group set perm_value=75 where server_id=0 and id1=3 and id2=0 and perm_id='i_needed_modify_power_virtualserver_modify_ft_settings' and perm_value=100 and perm_negated=0 and perm_skip=0
    update perm_server_group set perm_value=75 where server_id=0 and id1=3 and id2=0 and perm_id='i_needed_modify_power_virtualserver_modify_hostbanner' and perm_value=100 and perm_negated=0 and perm_skip=0
    update perm_server_group set perm_value=75 where server_id=0 and id1=3 and id2=0 and perm_id='i_needed_modify_power_virtualserver_modify_hostbutton' and perm_value=100 and perm_negated=0 and perm_skip=0
    update perm_server_group set perm_value=75 where server_id=0 and id1=3 and id2=0 and perm_id='i_needed_modify_power_virtualserver_modify_hostmessage' and perm_value=100 and perm_negated=0 and perm_skip=0
    update perm_server_group set perm_value=75 where server_id=0 and id1=3 and id2=0 and perm_id='i_needed_modify_power_virtualserver_modify_maxclients' and perm_value=100 and perm_negated=0 and perm_skip=0
    update perm_server_group set perm_value=75 where server_id=0 and id1=3 and id2=0 and perm_id='i_needed_modify_power_virtualserver_modify_port' and perm_value=100 and perm_negated=0 and perm_skip=0

  8. #8
    Join Date
    December 2009
    Location
    Hungary
    Posts
    162
    Wow, pretty useful information there, good job AJH16!

    So you're saying that using your query will only update or delete default permissions, i.e. even when upgrading from version 3 to 10, the whole script can be executed, as the database changes introduced by version 2 won't be modified again.

    My other question is, where are the server_properties changes, like virtualserver_log_permissions?

    And the Teamspeak crew is still dead silent on how to upgrade the database... Most annoying.

  9. #9
    Join Date
    December 2009
    Location
    Paris - France
    Posts
    2

    Importing saved database content into fresh installed DB ?

    Hi, thank you for the tuto 1st !
    It explained me why I was missing so many fields.

    Quick question: why is it not possible to save, let's say a beta 3 DB version, install a brand new (and fresh with ALL latest fields and permissions) beta15 and import data from the saved database ?

    Is it just a question of writing the proper SQL script ?
    Or is there another issue like encryption keys ?

    PS: Sorry if stupid question, but that's more than 20 years I have not really worked with SQL

  10. #10
    Join Date
    August 2005
    Location
    Clifton Park, NY
    Posts
    5
    Probus. The problem is two fold. First, there could theoretically be changes in the structure of the DB that would make loading from another DB impossible. The second, bigger and more likely issue, is that in the version 15 DB, there are many default values. When you try to load the version 3 DB, there is no way to tell what are old default values, what are new default values, and what are actually changes you have made. Say for example that in version 3 there were 3 default values 1, 2 and 3. You then added a custom value 4. Well now in version 15 there may be defaults 1, 2, 3 and 4. There is no way for the system to know that your 4 is different from the previous 4 when trying to merge. Instead, it is neccessary to analysed the differences between the start of 3 and the start of 15 and alter only the necessary rows and structures to ensure compatibility. I hope that explanation helps.

  11. #11
    Join Date
    August 2005
    Location
    Clifton Park, NY
    Posts
    5
    MoxNox. No, the script I posted can only be used to and from the version it is designed for. What it won't do however is alter any default values that YOU have changed. If there were additions between the version the script was designed for and the version you have, then you would end up with duplicate rows or perhaps invalid attempts to remove records and it would quite possibly corrupt your DB. You should instead produce a separate script using the procedure I described. It is important to make sure you keep the zip files for each release in it's initial form to ensure you can generate the needed scripts.

  12. #12
    Join Date
    February 2010
    Location
    UK
    Posts
    26
    Thanks for the info here fellas.

    Got a question tho, what if, like me, your not using a database to connect to...?

    How can I update our server without deleting whats already set up?

    Were running linux 32 bit, no database at all, basic licence....

    teamspeak3-server_linux-x86-3.0.0-beta16

    Can I just FTP the new release and "over-write" the current files on my server?

    Any help would be appreciated.

    Floyd.

  13. #13
    Join Date
    February 2010
    Location
    CT, USA
    Posts
    7
    Quote Originally Posted by floyd View Post
    Thanks for the info here fellas.

    Got a question tho, what if, like me, your not using a database to connect to...?

    How can I update our server without deleting whats already set up?

    Were running linux 32 bit, no database at all, basic licence....

    teamspeak3-server_linux-x86-3.0.0-beta16

    Can I just FTP the new release and "over-write" the current files on my server?

    Any help would be appreciated.

    Floyd.
    This is basically the extent of what I did and it seems to work okay.
    I just downloaded the new file, extracted it to the same location, and hit Yes to All for the replacement of files.

    Thankfully everything is still as it should be.

  14. #14
    Join Date
    December 2009
    Location
    Hungary
    Posts
    162
    Quote Originally Posted by floyd View Post
    Thanks for the info here fellas.
    Got a question tho, what if, like me, your not using a database to connect to...?
    How can I update our server without deleting whats already set up?
    Were running linux 32 bit, no database at all, basic licence....
    teamspeak3-server_linux-x86-3.0.0-beta16
    Can I just FTP the new release and "over-write" the current files on my server?
    Any help would be appreciated.
    Floyd.
    Uhm, everyone is using a database. In your case it's an SQLite database, and it's a single file in your server folder called ts3server.sqlitedb. You'll be ok with a simple overwrite though.

  15. #15
    Join Date
    December 2009
    Location
    Hungary
    Posts
    162
    From Peter, a TS dev:

    [If] We added a new permission, since the permission system on TS3 is very flexible we have no idea which groups you might want to grant this permission (if any), so we can not grant it to any groups. This of course may lead to a feature being inaccessible even to your highest tier groups, but in the past the new permissions all dealt with specialities that I never needed or wanted to use. We cannot run inserts like the second post in this thread suggests simply because we do not know which group should get which permissions. Sure we know how it should be for our default permission setup, but your setup can differ greatly.
    IF (and I suggest only if) you require one of the new permissions, you need to manually grant it to the group you want to have it (e.g. via a db insert). 95% (wild guess) of all users can upgrade from beta1 to beta17 without a single manual database edit, just copying the database over and starting, since you don't ever use any of the newly added special features you won't ever notice that YOUR server admin does not have the permission to do so.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Not Supported] [Mini-Tutorial] How to copy permissions from group x to group y
    By Soljia in forum Server Support
    Replies: 6
    Last Post: July 4th, 2016, 09:16 AM
  2. [TUTORIAL] Easy Teamspeak3 Linux Server Upgrade Guide
    By IrocZspoT in forum Linux / FreeBSD
    Replies: 1
    Last Post: January 5th, 2014, 08:54 AM
  3. [Mini-tutorial] Cloning Permission Groups!
    By willy_sunny in forum Permission System
    Replies: 5
    Last Post: July 12th, 2010, 03:15 PM
  4. [Mini-Tutorial] Fix ServerAdmin Lost Password (MYSQL)
    By Appleboy in forum Server Support
    Replies: 2
    Last Post: December 24th, 2009, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •