oar-database(1)
π oar-database(1) β the OAR commands girlies know her
okay so bestie, welcome to oar-database, the manual page for managing the OAR database. she's from the OAR commands family and she is, lowkey, the backbone of the whole operation. let's get into it β¨
πΈ NAME πΈ
oar-database β manage OAR database. that's it, that's the job, and she ate π
β¨ SYNOPSIS β¨
like, here's how you summon her:
oar-database --create [OPTIONS]
oar-database --drop [OPTIONS]
oar-database --upgrade [OPTIONS]
oar-database --reset [OPTIONS]
oar-database --check [OPTIONS]
five whole moods. pick one, bestie π«Ά
π¦ DESCRIPTION π¦
so OAR keeps all its persistent data in a database, and that database is either the MySQL backend or the PostgreSQL backend (check oar.conf for which one you're on, iykyk). and oar-database? she's literally the one you call to manage that database. main character energy fr fr π
π ACTIONS π
these are the big five. choose your fighter:
--createβ create an OAR database: inject schema and default data and create users/roles. the full glow-up from nothing β¨--dropβ drop an existing OAR database and associated users/roles. it's giving... deletion. no cap π--upgradeβ upgrade an existing OAR database. glow-up but make it already existing π--resetβ reset an existing OAR database to the state of the fresh new one. factory reset but she's a database π--checkβ check that OAR database is accessible and up to date (schema version). the vibe check, literally π
π OPTIONS π
General parameters π«Ά
--conf=OAR_CONF_FILEβ define the OAR configuration file to use. by default/etc/oar/oar.confis used. and if that file doesn't exist? the default parameters for each value are used. she's flexible like that β¨--update-confβ the database parameters given in the command line are written to theOAR_CONF_FILE. so she remembers what you said, periodt π-f,--force-sqlβ force to continue the execution even if a SQL command fails. bold move, bestie. she's not gonna stop for anyone π₯-y,--force-yesβ forceoar-databaseto continue without prompt even if it could be harmful. no take-backs, no confirmations, just vibes π¨
Database backend parameters π
these parameters are only required by the--createand--dropactions. the others don't need them, so don't stress πΈ
--db-is-localβ PostgreSQL: use local admin account to execute admin commands. MySQL: use the unix socket connection to execute admin commands. local girl behavior, we love it π--db-admin-user=DB_ADMIN_USERβ set database backend admin username.--db-admin-pass=DB_ADMIN_PASSβ set database backend admin password.
OAR database parameters π
if not specified, OAR database parameters are taken from OAR_CONF_FILE. and like, please prefer setting the configurations in that file instead of using these options. i'm just the messenger bestie, she said what she said π
--db-type=DB_TYPEβ database backend to use,mysqlorPg(for PostgreSQL). yes, capital P lowercase g, that's not a typo, copy it exactly β¨--db-user=DB_USERβ set OAR username to access the database. override the one set inOAR_CONF_FILE.--db-pass=DB_PASSβ set OAR user password to access the database. override the one set inOAR_CONF_FILE.--db-host=DB_HOSTβ set the database backend hostname. override the one set inOAR_CONF_FILE.--db-port=DB_PORTβ set the database backend TCP port. override the one set inOAR_CONF_FILE.--db-name=DB_NAMEβ set OAR database name. override the one set inOAR_CONF_FILE.--db-ro-user=DB_RO_USERβ set OAR username for read-only access the database. override the one set inOAR_CONF_FILE.--db-ro-pass=DB_RO_PASSβ set OAR user password for read-only access the database. override the one set inOAR_CONF_FILE.-d,--debugβ activate the display of debugging information. she's gonna tell you EVERYTHING π£οΈ-h,--helpβ display this help. the classic, the icon, the moment π
π EXAMPLES π
MySQL π¬
first you need to specify the database parameters in /etc/oar/oar.conf. these parameters will be used by oar-database.
to create a new database (assuming that the MySQL root password is PASS):
oar-database --create --db-admin-user root --db-admin-pass PASS
or if the MySQL server is local and accessible using the unix socket:
oar-database --create --db-is-local
to upgrade an existing database:
oar-database --upgrade
PostgreSQL π
first you need to specify the database parameters in /etc/oar/oar.conf. these parameters will be used by oar-database. if your PostgreSQL database is on the local system, you can use the --db-is-local option which will use PostgreSQL unix account (needs root privileges). yes bestie, root privileges, don't forget π
to create a new database:
oar-database --create --db-is-local
to upgrade an existing database:
oar-database --upgrade
Advanced usages π₯
to make some tests or to administrate several databases, you can also specify the sql parameters on the command line. for example:
oar-database --create --db-type=Pg --db-host=HOST \
--db-user=oar --db-pass=PASS \
--db-admin-user=ADMIN_USER --db-admin-pass=ADMIN_PASS
will create the oar database and the oar user on the postgresql system hosted by HOST. the user ADMIN_USER must have the right to create new databases and new roles on this system. so like, permissions check first, bestie π«Ά
π§ FILES π§
/usr/lib/oar/database/mysql_structure.sql,/usr/lib/oar/database/pg_structure.sqlβ SQL instructions for creating the structure of theoardatabase./usr/lib/oar/database/mysql_default_admission_rules.sql,/usr/lib/oar/database/pg_default_admission_rules.sqlβ SQL instructions for inserting the default admission rules in theoardatabase./usr/lib/oar/database/default_data.sqlβ SQL instructions for inserting the default data in theoardatabase./usr/lib/oar/database/mysql_reset_structure.sql,/usr/lib/oar/database/pg_reset_structure.sqlβ SQL instruction for emptying an existingoardatabase./usr/lib/oar/database/mysql_structure_upgrade_*.sql,/usr/lib/oar/database/pg_structure_upgrade_*.sqlβ SQL instructions for upgrading an existing database.
those * wildcards are doing so much work and honestly, respect π
π COPYRIGHTS π
Copyright 2003-2018 Laboratoire d'Informatique de Grenoble (http://www.liglab.fr). This software is licensed under the GNU General Public License Version 2 or above. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
NO warranty bestie. not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. she said it, i'm just relaying it π
and that's the whole page!! this was oar-database from the OAR commands collection, dated 2023-07-10. go manage that database, you absolute icon πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu noble: oar-server 2.5.10-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms