H3.3. Database Commands |
Database Initialization
drwcsd [<switches>] modexecdb database-init [<license_key> [<password>]]—database initialization. •<license_key>—path to Dr.Web license key file agent.key. If the license key is not specified, it must be added later from the Control Center or get from the neighbor Dr.Web Server via the interserver connection. •<password>—original password of the Dr.Web Server administrator (logged in as ). The 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 modexecdb database-init@<response-file> <response-file>—file with initialization parameters written line-by-line in the same order same as parameters of the database-init command. File format:
If a string consists of only the %nil value, the default value is used (as in database-init). Database Upgrading drwcsd modexecdb database-upgrade [pretend=false]—run Dr.Web Server to upgrade the structure of the database to a new version using the internal scripts. •pretend=false — instructs to check that the database schema is up-to-date instead of the actual upgrade of its structure. false by default. If true, it will only make sure that the database schema is up-to-date. Database Export a)drwcsd modexecdb database-export <file>—export the database to a 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 modexecdb database-export-xml <xml_file>—export the database to a 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:
a)drwcsd modexecdb database-import <file>—import the database from a specified file (the previous content of the database is deleted). b)drwcsd modexecdb database-import-and-upgrade <file>—import and upgrade the database exported from Dr.Web Server of previous version (the previous content of the database is deleted).
Database Verification drwcsd modexecdb database-verify [full=false [ignore-version=false]]—run Dr.Web Server to verify the database. In order to record the results into a log file, the command shall be followed by a -log key. Details on how to use the key are described in H3.8. The Description of Switches. •full=false — defines the verification type. By default (false) a quick check is made, if true—a full verification. •ignore-version=false — defines whether the database schema version needs to be ignored during verification. false by default. If true, verification will continue even if the schema version is wrong. Database Speed Up drwcsd [<switches>] modexecdb database-speedup—execute the VACUUM, CLUSTER, ANALYZE commands to speed up the DB operation. Database Restore drwcsd repairdb—repair malformed disk image of embedded database or corrupted tables of external database. may be also automatically recovered on the Dr.Web Server startup if in the database settings in the Control Center, the flag is set (see , p. Database Restore). drwcsd modexecdb database-clean—clean up the Dr.Web Server database by deleting all tables. drwcsd modexecdb set-admin-password <login> <new_password>—set a new password for the specified administrator account. |