Restoring the Database of Dr.Web Enterprise Security Suite

Dr.Web ESS regularly backs up important data (database contents, Server license key, private encryption key, Server configuration key, and Dr.Web Control Center configuration key). The backup files are stored in the following folders (relatively to the Server installation folder):

for Windows OS: \var\Backup

for Linux OS: /var/opt/drwcs/backup

for FreeBSD and Solaris OS: /var/drwcs/backup

For that purpose a daily task is included to the Server schedule. If such task is missing, it is strongly recommended to create it.

The copies are stored in the .dz format unpackable with gzip and other archivers. After unpacking all the files, except for the database contents, are ready to use. To restore the data, the database contents can be imported from the backup to another database of the Server by means of the importdb switch.

Restoring the DB for Different Versions of the Enterprise Server

You can restore the DB from the backup copy only if it had been created via the Server of the same major version as the version of the Server which you use for restoring.

For example:

You can restore DB from the backup created via the Server of 5.0 version using the Server of 5.0 version only.

You can restore DB from the backup created via the Server of 6.0 version using the Server of 6.0 version only.

You cannot restore DB from the backup created via the Server of 5.0 or 4.XX version using the Server of 6.0 version.

If DB has been corrupted for some reasons during Server upgrade from previous versions to 6.0 version, do the following:

1.Remove the Server software of 6.0 version. Backup copies of files, used by the Server, will be stored automatically.

2.Install the Server of version, which had been installed before upgrading and had been used to create backup copy.

According to the general upgrade procedure, you should use all stored Server files except the DB file.

Create a new DB during the Server installation.

3.Restore DB from the backup according to general rules (see procedures below).

4.Disable the Agent, the Server and the Network Installer protocols in the Server settings. To do this, select the Administration item in the main menu and click Configure Dr.Web Enterprise Server in the control menu, go to the Modules tab and clear corresponding flags.

5.Upgrade the Server to the 6.0 version according to general rules (see p. Updating the Dr.Web Enterprise Security Suite Software and Its Components).

6.Enable the Agent, the Server and the Network Installer protocols, disabled at the step 4.

For Windows OS

To restore DB from backup:

1.Stop the Enterprise Server (if it is running, see Start and Stop the Dr.Web Enterprise Server).

2.Import the content of the database from the correspondent backup file. The command line will look as follows:

"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 importdb "<path_to_the_backup_file>\database.dz"

The command must be entered in a single line. It is presumed that Enterprise Server is installed to the C:\Program Files\DrWeb Enterprise Server folder.

3.Start the Enterprise Server (see Start and Stop the Dr.Web Enterprise Server).

To restore DB from backup in case of changing the Dr.Web Enterprise Server version or corruption of the previous DB version:

1. Stop the Enterprise Server (if it is running, see Start and Stop the Dr.Web Enterprise Server).

2. Remove the current DB. To do this:

2.1. For the internal DB:

a)Remove dbinternal.dbs file.

b)Initialize a new database. In Windows the command line will look as follows:

"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 initdb D:\Keys\agent.key - - <password>

The command must be entered in a single line. (See also drwcsd command format with the initdb switch at the Appendix H5.3.). It is presumed that Enterprise Server is installed to the C:\Program Files\DrWeb Enterprise Server folder and agent.key is located in D:\Keys.

c)Once this command is executed, a new dbinternal.dbs of about 200 Kb will be generated in the var subfolder of Enterprise Server installation folder.

2.2.  For the external DB: cleanup the DB via the clean.sql script, located in the etc subfolder of Enterprise Server installation folder.

3.Import the content of the database from the correspondent backup file. The command line will look as follows:

"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 importdb "<disc:>\<path_to_the_backup_file>\database.dz"

The command must be entered in a single line. It is presumed that Enterprise Server is installed to the C:\Program Files\DrWeb Enterprise Server folder.

4.Start the Enterprise Server (see Start and Stop the Dr.Web Enterprise Server).

For UNIX OS

1.Stop Enterprise Server.

for Linux OS and Solaris OS:

/etc/init.d/drwcsd stop

for FreeBSD OS:

/usr/local/etc/rc.d/drwcsd.sh stop

for other supported versions:

/bin/drwcs.sh stop

2.Remove dbinternal.dbs from the

for Linux OS:

/var/opt/drwcs/

for FreeBSD OS and Solaris OS:

/var/drwcs/

subfolder of the Server installation folder.

 

To clean an external DB, use the clean.sql script, located at:

/var/opt/drwcs/etc for Linux OS,

/var/drwcs/etc for Solaris OS and FreeBSD OS.

 

3.Initialize the Server database. The command will look as follows:

for Linux OS and Solaris OS:

/etc/init.d/drwcsd initdb

for FreeBSD OS:

/usr/local/etc/rc.d/drwcsd.sh initdb

for other supported versions:

su drwcs -c "bin/drwcsd -var-root=./var -verbosity=all -log=./var/server.log initdb etc/agent.key - - <password>"

4.Once this command is executed, a new dbinternal.dbs database of about 200 Kb will be generated in the var subfolder of Enterprise Server installation folder.

5.Import the content of the database from the correspondent backup. The command line will look as follows:

for Linux OS and Solaris OS:

/etc/init.d/drwcsd importdb "/<path_to_the_backup_file>/database.dz"

for FreeBSD OS:

/usr/local/etc/rc.d/drwcsd.sh importdb "/<path_to_the_backup_file>/database.dz"

for other supported versions:

bin/drwcsd -var-root=./var -verbosity=all -log=logfile.log importdb "/<path_to_the_backup_file>/database.dz"

6.Start Enterprise Server:

for Linux OS and Solaris OS:

/etc/init.d/drwcsd start

for FreeBSD OS:

/usr/local/etc/rc.d/drwcsd.sh start

for other supported versions:

/bin/drwcs.sh start

 

If you want to run the script with parameters (e.g., set Server installation directory, change log details level and etc.), you must make all changes in the start script:

for FreeBSD OS: /usr/local/etc/rc.d/drwcsd.sh

for Linux and Solaris OS: /etc/init.d/drwcsd

 

If some Agents were installed after the last backup had been made they will not be connected to the Server after the database has been restored from the backup. You should remotely reset them to the newbie mode. To do this, on Dr.Web Control Center Administration menu, select Configure Server. A Dr.Web Enterprise Server configuration window will be opened on the General tab. Set the Reset unauthorized to newbie flag.

 

As soon as the database is restored from the backup it is recommended to connect the Dr.Web Control Center to the Server. On the Administration menu, selectDr.Web Enterprise Server schedule and check that the Back up critical server data task is on the list. If this task is absent, add it to the list.