Changes

Jump to navigation Jump to search
885 bytes added ,  15:59, 25 July 2022
m
Text replacement - "ub-director" to "ubdirector"
This page is part of the [[Getting Started]] Section. It gives some insight into the configuration of BaseX.
 
==Configuration Files==
 
BaseX maintains some configuration files, which are stored in the project’s [[#Home Directory|Home Directory]]:
 
* <code>.basex</code> contains all options that are relevant for running the server or standalone versions of BaseX.
* <code>.basexgui</code> defines all options relevant to the BaseX GUI.
* <code>.basexhistory</code> contains commands that have been typed in most recently.
* An empty <code>.basexhome</code> file can be added to a directory to mark it as [[#Home Directory|home directory]].
 
Note that:
 
* Depending on your OS and configuration, files and folders with a '.' prefix may be hidden.
* In the [[Web Application]] context, options can be defined in the <code>web.xml</code> file.
 
==Home Directory==
As BaseX is a portable applicationdistributed in different flavors, and as it may be started from different locations, it dynamically determines its home directory: * First, the '''Java system property''' {{Code|org.basex.path}} is checked. If it contains a value, it is chosen as directory path.* If not, the '''current user directory''' (defined by the system property {{Code|user.dir}}) is selected if the {{Code|.basex}} or {{Code|.basexhome}} file is found in this directory. Three potential choices for * If not, the '''application directory''' (the folder in which BaseX is located) is chosen if one of these two files is found in that directory.* In all other cases, a {{Code|basex}} subdirectory in the '''user home directory''' will be returned. The user home directory exist:is retrieved via the {{Code|HOME}} environment variable, or (if unassigned) the Java system property {{Code|user.home}}.
* By default, the '''user's home directory''' is chosen to store the If BaseX configuration and database files.* The '''current working directory''' is selected if the configuration files are found used in an embedded environment (such as a servlet in this a [[Web Application]]), it may not immediately be clear which directorywas picked. This way, you You can define local settings, which will be ignored if you run BaseX from another directory.* Second, the '''application directory''' is checked for configuration filesXQuery expression <code>Q{java:org. This directory will be chosen, ebasex.gutil., if the Windows installer has been used Prop}HOMEDIR()</code> to get BaseX runningfind out.
==Database Directory==
A database in BaseX [[Databases]] consists of several binary files, which . These are all bundled located in a folder with directory named by the database name.<br />All of these files are stored in a <code>BaseXData</code> directory in the home directorydatabase. <br />The path can be changed in the following ways:*[[GUI Tutorialdatabase root directory is named {{Code|GUI]]: Choose ''Options'' → ''Preferences'' and choose a new database pathdata}}.*[[Server Tutorial|Server]]/[[Standalone Tutorial|Standalone]]: <code>SET DBPATH [path]</code>
NoteThe database path can be changed as follows: After having changed the * GUI: Choose ''Options'' → ''Preferences'' and choose a new database path, all existing databases have to be manually moved to .* General: edit the {{Option|DBPATH}} option in the new location{{Code|.basex}} configuration file
'''Note:''' Existing databases will not automatically be moved to the new destination. ==Configuration Log Files== Log files are stored in text format in a <code>.logs</code> subdirectory of the database folder (see [[Logging]] for more information). =Changelog= ;Version 9.0 * Updated: Detection and configuration of home directory and subdirectories.
BaseX uses three configuration files, which are stored in the [[Configuration Files#Home directory|Home Directory]](note that, depending on your OS and configuration, files and folders with a ';Version 8.' prefix may be hidden):0
* <code>Updated: {{Code|.basex</code> contains all options that basexperm}} is obsolete. Users are relevant for running the server or standalone versions of BaseXnow stored in {{Code|users.* <code>.basexgui</code> defines all options relevant to xml}} in the BaseX GUI.* <code>.basexperm</code> contains user name, passwords, and permissionsdatabase directory (see [[User Management]] for more information).
==User and Log Files==The global users are stored in the <code>.basexperm</code> file in the home directory as the configuration files. Local users and permissions are stored in the meta data of the database, so they don't need an extra file. <br />All log files are stored in text format in the home directory <code>BaseXData/.logs</code>;Version 7.7
* Updated: The {{Code|.basexhome}} file marks a folder as [[Category: Internal#Home Directory|home directory]].
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu