KB10034 How to manually restore vProtect databse from sql file

📚

Documentation

Installation guides, configuration steps, and product documentation.

Explore documentation →

🎧

Support

Create a support request or review your existing cases.

Go to support →

⬇️

Download trial

Download the product trial and try it out.

View downloads →

KB10034 How to manually restore vProtect databse from sql file

KB ID: 10034

Product: vProtect

Version: 4.0+

Published: 2021-03-28

Last modified: 2021-03-28

Problem

vProtect database is broken

 

Solution

Restore vProtect database from the file

 

Identify where backup of the database of vprotect is stored. Default location is /tmp

[root@vprotect ~]# ls-l /tmp

[root@vprotect tmp]# ls -l /tmp
total 46148
-rw-r--r--. 1 vprotect vprotect 169860 Mar 28 13:00 vprotect_db.sql.gz

Unzip vprotect_db.sql.gz file

[root@vprotect tmp]# gzip -d vprotect_db.sql.gz

[root@vprotect tmp]# gzip -d vprotect_db.sql.gz

[root@vprotect tmp]# ls -l
total 47152
-rw-r--r--. 1 vprotect vprotect 1200076 Mar 28 13:00 vprotect_db.sql

Stop vprotect-server

[root@vprotect ~]# systemctl stop vprotect-server

[root@vprotect tmp]# systemctl stop vprotect-server

Login to MariaDB, drop vprotect database, and create a new vprotect database

[root@vprotect ~]# mysql -u root -p<password>

[root@vprotect ~]# mysql -u root -p<password>

MariaDB [(none)]> drop database vprotect;
Query OK, 89 rows affected (1.166 sec)

MariaDB [(none)]> create database vprotect;
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> quit;
Bye

Import vprotect database from sql file

[root@vprotect ~]# mysql -u root -p<password> vprotect < vprotect_db.sql

[root@vprotect ~]# mysql -u root -p<password> vprotect < vprotect_db.sql

Start vprotect-server

[root@vprotect ~]# systemctl start vprotect-server

[root@vprotect ~]# systemctl start vprotect-server