Changes

Jump to navigation Jump to search
886 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 uses three maintains some configuration files, which are stored in the project’s [[Configuration Files#Home directoryDirectory|Home Directory]](note that, depending on your OS and configuration, files and folders with a '.' prefix may be hidden):
* <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>.basexpermbasexhistory</code> contains user namecommands 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, passwordsfiles and folders with a '.' prefix may be hidden.* In the [[Web Application]] context, and permissionsoptions 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. Three potential choices for the home directory exist:
* By defaultFirst, the '''user's home directoryJava system property''' {{Code|org.basex.path}} is checked. If it contains a value, it is chosen to store the BaseX configuration and database filesas directory path.* The If not, the '''current working user directory''' (defined by the system property {{Code|user.dir}}) is selected if the configuration files are {{Code|.basex}} or {{Code|.basexhome}} file is found in this directory. This way, you can define local settings* If not, the '''application directory''' (the folder in which will be ignored BaseX is located) is chosen if you run BaseX from another one of these two files is found in that directory.* SecondIn all other cases, a {{Code|basex}} subdirectory in the '''application user home directory''' is checked for configuration fileswill be returned. This The user home directory will be chosenis retrieved via the {{Code|HOME}} environment variable, eor (if unassigned) the Java system property {{Code|user.ghome}}If BaseX is used in an embedded environment (such as a servlet in a [[Web Application]]), if it may not immediately be clear which directory was picked. You can run the Windows installer has been used XQuery expression <code>Q{java:org.basex.util.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 database. The database root directoryis named {{Code|data}}. <br /> The database path can be changed in the following waysas follows:*[[GUI Tutorial|GUI]]: Choose ''Options'' → ''Preferences'' and choose a new database path.*[[Server TutorialGeneral: edit the {{Option|Server]]/[[Standalone TutorialDBPATH}} option in the {{Code|Standalone]].basex}} configuration file '''Note: ''' Existing databases will not automatically be moved to the new destination. ==Log Files== Log files are stored in text format in a <code>SET DBPATH [path].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. ;Version 8.0
Note* Updated: After having changed {{Code|.basexperm}} is obsolete. Users are now stored in {{Code|users.xml}} in the database path, all existing databases have to be manually moved to the new locationdirectory (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