H4.3. Database Commands |
Database Initialization drwcsd [<keys>] initdb <license_key> [<DB_script> [<ini_file> [<password>]]]—database initialization. •<license_key>—path to Dr.Web license key file agent.key (must be specified). •<DB_script>—DB initialization script. The - (minus) special value means not to use such script. •<ini_file>—previously formed file in the drweb32.ini format, to set the initial configuration of Dr.Web software components (i.e. for the group). The - (minus) special value means not to use such file. •<password>—original password of the Server administrator (the name is ). Default password is .
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 same as parameters of the initdb command. File format:
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 instructions from the <script> file. Database Upgrading drwcsd upgradedb <folder>—run the Server to upgrade the structure of the database to a new version (see the update-db folder). Database Export a)drwcsd exportdb <file>—export the database to the specified file. :
Under system-based OS, the action is performed on behalf of the drwcs:drwcs user to the $DRWCS_VAR directory (except 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 write access for the <user>:<group> that had been created at installation, by default it is drwcs:drwcs). b)drwcsd xmlexportdb <xml_file>—export the database to the specified xml file. If you specify the gz file extension, when during the export, database file will be packed into the gzip archive. If you do not specify any extension or specify an extension other than gz, when export file will not be archived. : •To export the database into the xml file with no compression:
•To export the database into the xml file compressed to an archive:
: •To export the database into the xml file with no compression:
•To export the database into the xml file compressed to an archive:
Database Import a)drwcsd importdb <file>—import the database from the specified file (the previous content of the database is deleted). b)drwcsd xmlimportdb <xml_file>—import the database from the specified xml file. Database Verification drwcsd verifydb—run the Server to check the database. After completion, the Server saves the verification results in the log file (drwcsd.log by default). Database speed up drwcsd [<switches>] speedupdb—execute the VACUUM, CLUSTER, ANALYZE commands to speed up the DB operation. Database cleanup drwcsd cleandb—cleanup database of the Server by deleting all database tables. |