H5.3. Database Commands

Database Initialization

drwcsd [<keys>] initdb <Agent_key> [<DB_script> [<ini_file> [<password>]]] — database initialization.

<Agent_key> — path to Agent license key file agent.key (must be specified).

<DB_script> — DB initialization script. A special value - (minus) means not to use such script.

<ini_file> — previously formed file in the drweb32.ini format, which will set the initial configuration of Dr.Web software components (i.e. for the Everyone group). A special value - (minus) means not to use such file.

<password> — original password of the Server administrator (his name is admin). By default, it is root.

 

A minus can be omitted, if the next parameters are missing.

 

Adjusting parameters of database initialization

If embedded database is used, initialization parameters can be set via an external file. The following command is used for this:

drwcsd.exe initdbex <response-file>

<response-file> - file with initialization parameters written line-by-line in the same order as the initdb parameters.

File format:

<path_to_key_file>

<path_to_initdb.sql>

<path_to_drweb32.ini>

<administrator_password>

 

If using a response file under Windows OS, any symbols are allowed in the administrator password.

 

Any strings following the necessary parameter in a particular case are optional. If a string consists of only the minus symbol "-", the default value is used (as in initdb).

Database Updating

drwcsd [<switches>] updatedb <script> — perform any action with the database (for example, update to a new version) by executing  SQL instructors from the <script> file.

Database Upgrading

drwcsd upgradedb  <folder> – run the Server to update the structure of the database at a version upgrade (see the update-db folder).

Database Export

drwcsd exportdb <file> – export the database to the specified file.

Example for Windows:

C:\Program Files\DrWeb Enterprise Server\bin\drwcsd.exe -home="C:\Program Files\DrWeb Enterprise Server" -var-root="C:\Program Files\DrWeb Enterprise Server\var" -verbosity=all exportdb "C:\Program Files\DrWeb Enterprise Server\esbase.es"

Under UNIX OS the action is performed on behalf of the drwcs:drwcs user to the directory $DRWCS_VAR (except for FreeBSD OS, which by default saves the file to the directory from which the script was run; if the path is specified explicitly, then the directory should have the recording right for the <user>:<group> that had been created at installation, by default it is drwcs:drwcs).

Database Import

drwcsd importdb <file> – import the database from the specified file (the previous content of the database is deleted).

Database Verification

drwcsd verifydb – run the Server to check the database. Upon completion, the Server saves the verification results in the log file (drwcsd.log by default).