What does it mean NethServer works on databases?


(Roberto Sitzia) #1

I would like to know, in brief, how NethServer uses databases to manage system configurations and if possible a couple of examples.


(Stefano) #2

in NS terms, db is a text file in /var/lib/nethserver/db (IIRC), that holds all the info/values needed to create conf files (using templates/fragments and events)

you can have has many db you want need

db (usually) can contain simple values as

myvar = MyValue

or something more complex as

myuser=user
 firstname=Stefano
 surname=Zamboni

you can interact with dbs from CLI using (doh!) the db command

with no parameters it display a brief help with the syntax

with db command you can add, edit, delete, show (in many output options) values and keys

I think this is enough… you should refer to the development manual


(Giacomo Sanchietti) #3

You can start from here:
http://docs.nethserver.org/projects/nethserver-devel/en/latest/databases.html

Feel free to ask more info!


(Stefano) #4

I guess that @sitz intent is to “tell” to users how NS works behind the curtains…

I agree that a link at the relevant page of the documentation is necessary


(Roberto Sitzia) #5

Exactly Stefano, however great explanation.

Thanks Giacomo