Forum

Results 1 to 6 of 6
  1. #1
    Join Date
    December 2009
    Location
    Hannover, Germany
    Posts
    35

    How to make TeamSpeak server look for ts3db_sqlite3.sqlitedb in different directory?

    Using the ts3db_sqlite3 driver I want to change the location of the SQLite database ($TS_DIR/ts3db_sqlite3.sqlitedb) to $TS_DIR/data/ts3db_sqlite3.sqlitedb.

    How to make TeamSpeak server look for ts3db_sqlite3.sqlitedb in different directory?

    I am using TeamSpeak server version 3.0.12.2 (Linux amd64).

  2. #2
    Join Date
    June 2008
    Posts
    18,273
    Don't think this is possible with build in server features (also think the path is harcdoed in the plugin).
    No developer ever told me any parameter for the server to change the location of the db.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  3. #3
    Join Date
    December 2009
    Location
    Hannover, Germany
    Posts
    35
    Thanks, dante696.

    So the only left solution (which I treat as ugly) is to create a symbolic link before the first start of TeamSpeak server, right?

  4. #4
    Join Date
    February 2012
    Location
    Germany
    Posts
    576
    The Teamspeak server has no explicit option to define a database directory. It creates the database in the "current directory". So chdir into the directory where you want your database and start the server. Then the server will create the database there.

    To actually make this work, you have to provide a customized ts3server.ini to the server where all the other paths are provided (dbsqlpath, dbsqlcreatepath, logpath,, since they are no longer located in the current directory.
    What you cannot change in the ini file is the path to the serverquerydocs/ directory (all the help text to the query admin interface). Just create a symbolic link in the database directory to the actual directory, so the server will find it.
    The Teamspeak will also create the files/ directory in the database directory. This is for the avatar and uploaded channel files. Usually, you don't want to change this.

    Additionally, your server may have problems finding the *.so files. Provide the path to them with LD_LIBRARY_PATH.
    All this probably require the creation of a customized start script.

    I made something like this. I did even more: I moved the server binary to /usr/bin and the *.so to a new /usr/lib64/teamspeak3-server directory (and provided a *.conf file for ldd, so the system finds them without setting LD_LIBRARY_PATH).

    A working example for this can be seen in https://www.wombaz.de/uploads/2015/0...k3-server.spec which can be used to create a *.rpm file. Just create the *.rpm file and see what scripts and files it contains. Updating the server this way means a downtime of about 10 seconds during the update, by the way.

    The file listing looks like this (to let you see how to distribute the files into the correct directories):

    Code:
    -rw-r--r--    1 root    root                       29 Feb 22 16:41 /etc/ld.so.conf.d/teamspeak3-server-x86_64.conf
    -rw-r--r--    1 root    root                      124 Feb 22 16:41 /etc/logrotate.d/teamspeak3-server
    drwxr-xr-x    2 root    root                        0 Feb 22 16:41 /etc/teamspeak3
    -rw-r--r--    1 root    root                        1 Feb 22 16:41 /etc/teamspeak3/query_ip_blacklist.txt
    -rw-r--r--    1 root    root                       10 Feb 22 16:41 /etc/teamspeak3/query_ip_whitelist.txt
    -rw-r--r--    1 root    root                      396 Feb 22 16:41 /etc/teamspeak3/ts3server.ini
    -rw-r--r--    1 root    root                     2069 Feb 15 15:53 /etc/teamspeak3/tsdns_settings.ini
    -rwxr-xr-x    1 root    root                      556 Feb 22 16:41 /usr/bin/get-query-admin.sh
    -rwxr-xr-x    1 root    root                  8130576 Feb 15 15:53 /usr/bin/ts3server
    -rwxr-xr-x    1 root    root                   954248 Feb 15 15:53 /usr/bin/tsdnsserver
    -rw-r--r--    1 root    root                      313 Feb 22 16:41 /usr/lib/firewalld/services/teamspeak3-server.xml
    -rw-r--r--    1 root    root                      242 Feb 22 16:41 /usr/lib/firewalld/services/tsdns-server.xml
    -rw-r--r--    1 root    root                      384 Feb 22 16:41 /usr/lib/systemd/system/teamspeak3-server.service
    -rw-r--r--    1 root    root                      332 Feb 22 16:41 /usr/lib/systemd/system/tsdns-server.service
    drwxr-xr-x    2 root    root                        0 Feb 22 16:41 /usr/lib64/teamspeak3-server
    -rwxr-xr-x    1 root    root                  2019584 Feb 15 15:53 /usr/lib64/teamspeak3-server/libts3db_sqlite3.so
    drwxr-xr-x    2 root    root                        0 Feb 22 16:41 /usr/share/doc/teamspeak3-server-3.0.12.2
    -rw-r--r--    1 root    root                    47668 Feb 15 15:53 /usr/share/doc/teamspeak3-server-3.0.12.2/CHANGELOG
    -rw-r--r--    1 root    root                    36712 Feb 15 15:53 /usr/share/doc/teamspeak3-server-3.0.12.2/LICENSE
    -rw-r--r--    1 root    root                    13758 Feb 22 16:41 /usr/share/doc/teamspeak3-server-3.0.12.2/README.install
    drwxr-xr-x    2 root    root                        0 Feb 22 16:41 /usr/share/doc/teamspeak3-server-3.0.12.2/doc
    -rw-r--r--    1 root    root                     5070 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/accounting.txt
    -rw-r--r--    1 root    root                    16357 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/permissiondoc.txt
    -rw-r--r--    1 root    root                     7624 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/privilegekey_guide.txt
    -rw-r--r--    1 root    root                    18195 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/server_quickstart.txt
    -rw-r--r--    1 root    root                     3758 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/server_upgrade.txt
    drwxr-xr-x    2 root    root                        0 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/serverquery
    -rw-r--r--    1 root    root                    29333 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/serverquery/TeamSpeak_Logo.png
    -rw-r--r--    1 root    root                   181520 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/serverquery/serverquery.html
    -rw-r--r--    1 root    root                     3895 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/serverquery/stylesheet.css
    -rw-r--r--    1 root    root                     3921 Jan 21 12:12 /usr/share/doc/teamspeak3-server-3.0.12.2/doc/update_mysql_to_mariadb.txt
    drwxr-xr-x    2 root    root                        0 Feb 22 16:41 /usr/share/doc/teamspeak3-server-3.0.12.2/tsdns
    -rw-r--r--    1 root    root                     3993 Feb 15 15:53 /usr/share/doc/teamspeak3-server-3.0.12.2/tsdns/README
    -rw-r--r--    1 root    root                     2561 Feb 15 15:53 /usr/share/doc/teamspeak3-server-3.0.12.2/tsdns/USAGE
    -rw-r--r--    1 root    root                     2069 Feb 15 15:53 /usr/share/doc/teamspeak3-server-3.0.12.2/tsdns/tsdns_settings.ini.sample
    drwxr-xr-x    2 root    root                        0 Feb 22 16:41 /usr/share/teamspeak3-server
    drwxr-xr-x    2 root    root                        0 Jan 21 12:12 /usr/share/teamspeak3-server/serverquerydocs
    -rw-r--r--    1 root    root                      345 Jan 21 12:12 /usr/share/teamspeak3-server/serverquerydocs/banadd.txt
    [...]
    -rw-r--r--    1 root    root                      263 Jan 21 12:12 /usr/share/teamspeak3-server/serverquerydocs/whoami.txt
    drwxr-xr-x    2 root    root                        0 Jan 21 12:12 /usr/share/teamspeak3-server/sql
    -rw-r--r--    1 root    root                       65 Jan 21 12:12 /usr/share/teamspeak3-server/sql/ban_delete.sql
    [...]
    -rw-r--r--    1 root    root                     5136 Jan 21 12:12 /usr/share/teamspeak3-server/sql/updates_and_fixes/mariadb_fix_latin_utf8.sql
    drwxr-x---    2 teamspeateamspea                    0 Feb 22 16:41 /var/lib/teamspeak3
    lrwxrwxrwx    1 root    root                       44 Feb 22 16:41 /var/lib/teamspeak3/serverquerydocs -> /usr/share/teamspeak3-server/serverquerydocs
    drwxr-xr-x    2 teamspeateamspea                    0 Feb 22 16:41 /var/log/teamspeak3

  5. #5
    Join Date
    December 2004
    Location
    RF
    Posts
    3,007

  6. #6
    Join Date
    March 2015
    Posts
    12
    Sorry to resurrect this, and hopefully this is relevant all of these years later.
    After referencing the docker file for alpine: https://github.com/TeamSpeak-Systems...ine/Dockerfile

    When running the docker image:

    - Seemingly all import persistence related files (can someone confirm that this is the entirety of anything that would need to be persisted) are located in /var/ts3server as it is specified as the docker WORKDIR
    IE. These files are located upon running
    /var/ts3server/ contains files, logs, query_ip_blacklist.txt,query_ip_whitelist.txt, ts3server.sqlitedb,ts3server.sqlitedb-shm,and ts3server.sqlitedb-wal

    - Most core TS3 server related files are located in /opt/ts3server.

    Side Note: Interestingly enough the /run/ts3server/ts3server.ini file contains path configurations for numerous other items: licensepath, logpath, and a few others. The primary persistence location of server files and the sqlite database can not be configured by this ini file seemingly. The poorly documented and inconsistent seeming nature of the way you have to configure ts3 based off work directories, and also ini file has caused me and others confusion. Hopefully my 1-2 hours of research will help someone else.

    TLDR. From my limited testing it looks like simply selecting your work directory (CD to the location where your ts3server.sqlitedb is located) and running the server from that directory would allow you to select your location.

    Warfront1
    Last edited by warfront1; August 22nd, 2019 at 05:39 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: December 7th, 2012, 11:06 PM
  2. ts3db_sqlite3.dll halting
    By TheRaccoon in forum Windows
    Replies: 9
    Last Post: February 27th, 2012, 03:09 PM
  3. Replies: 1
    Last Post: February 14th, 2012, 09:32 AM

Tags for this Thread

Posting Permissions

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