BioStar 2 - V2.3 and higher - Back-up Database

BioStar 2 - How to backup and Restore the Database in BioStar 2

BioStar 2's database has gone through a few changes since it's release. 

The AC database started out with the SQLite Database and in version 2.2.1, the MariaDB T&A database was released. 

Starting version 2.3, both databases became Maria DB by default (express installation). Hence the backup method has changed as well. 

Refer to the image below to see the changes in the Database in BioStar 2 versions. 



Automatic database backup of AC database is only supported up to version 2.2.1


License Backup

If you would like to re-use your BioStar 2 license, refer to the following article: [BioStar 2] Reactivating the License



Database Backup

Cautions

- For BioStar 2.6, you must back up the encryption key. Refer to the backup instructions in the 2.6 database backup section below. 



2.0 ~ 2.2.2 Database Backup and Restore


You can use refer to the PDF attachment to back up your BioStar 2.0~2.2.2 database.
Note that the AC database can be backed up easily with a copy and paste after stopping BioStar 2 services because it is a SQLite DB.
For the T&A database, use the option to back up with the instructions shown in 2.3~ Database Backup below. 


2.3~2.5 Database Backup


Video Database Backup


BioStar 2 video integration was introduced in BioStar 2.5. 

In order to back up BioStar 2's video database you have to follow the procedure shown above in  2.3~2.5 database backup and also copy the files in the folders  below: 


C:\Program Files\BioStar 2(x64)\ve\records

C:\Program Files\BioStar 2(x64)\ve\db\

 


Graphic Map File Backup

From BioStar 2.7, you can make a Graphic Map with BioStar2 AC Advanced license.

In order to backup up BioStar2's graphic map, copy the files in the folder below.

C:\Program Files\BioStar 2(x64)\nginx\html\upload



Database Restore

Caution

- You cannot restore a backup of a different version of BioStar because the database structure is different for every version. 

If you do proceed to make such restoration, it will cause multiple issues with the server, including large amount of system logs, server crashes, device disconnections. 

i.e: backup of BioStar 2.4 restored in BioStar 2.5, backup of BioStar 2.5 in BioStar 2.4 > all not supported


- When restoring the T&A database, you have to restore the T&A database that was backed up in the same time as the AC database. If the AC and TA databases are backed up and restored in different time periods, it will cause issues with the server. 


2.3~2.5 Database Restore


1. Install MySQL Work Bench and Connect to the database as shown above in the back up process.
2. Select Data Import/Restore.
3. Click Import from Self-Contained File radio button.
4. Select your file to import by pressing the  button.
5. Click Start Import.

500


Note

When you restore the T&A database, you have to stop and start all BioStar 2 services again with BioStar Setting.


Important Note

Restore the files in the path below if you are using the "Secure Communication with device" option.

 C:\Program Files\BioStar 2(x64)\cert 




Configuration

If you are restoring your server in a new PC and not a existing BioStar 2 install, restore the server configuration as below. 

Open the setting.conf and system.conf files you backed up from C:\Program Files\BioStar 2(x64)

Paste the relevant configuration contents to the setting.conf and system.conf files in C:\Program Files\BioStar 2(x64)


Caution: Note that the items port (https server port) and ssl_address (server IP) in the setting.conf should be configured according to the new server's IP and BioStar Setting configuration.



2.6 ~ 2.7 Database Restore

Restore your database based on 2.3~2.5 database restore instruction and additionally restore the encryption key file located in C:\Program Files\BioStar 2(x64)\util

This must be placed in the directory before starting the services. 


Important Note

Restore the files in the path below if you are using the "Secure Communication with device" option.

 C:\Program Files\BioStar 2(x64)\cert 



Video Database Restore

In addition to restoring the database, restore the following folders that you have backed up 


C:\Program Files\BioStar 2(x64)\ve\records

C:\Program Files\BioStar 2(x64)\ve\db\


Image Logs

If you want to restore the image log images, you will have to paste the imagelog folder you backed up before in the BioStar 2 directory. 

C:\Program Files\BioStar 2(x64)\

Note: The image logs that are stored in this folder are the image logs that you have clicked to check in the monitoring menu. Not all logs are saved in this folder by design to help with BioStar 2 performance


Graphic Map File Backup

If you want to restore the applied files of Graphic map, you will have to paste the upload folder you backed up before in the BioStar 2 directory. 

C:\Program Files\BioStar 2(x64)\nginx\html\upload

    • Related Articles

    • BioStar 2 - How to backup and Restore the Maria Database in BioStar 2

      BioStar 2's database has gone through a few changes since it's release.  The AC database started out with the SQLite Database and in version 2.2.1, the MariaDB T&A database was released.  Starting version 2.3, both databases became Maria DB by ...
    • BioStar 2 - Hoe backup en restore ik de database?

      V2.3 en Hoger -  Database Back-up U zult MySQL Workbench moeten installeren om te database te back-uppen en terug te plaatsen.   Belangrijk bericht voor T&A gebruikers! Als u een schone installatie of herinstallatie uitvoert van BioStar 2.3 op de ...
    • BioStar 1 - Hoe kan ik een back-up maken van de database?

      U kunt een backup maken van de BioStar database met Microsoft SQL Server Management Studio Express. U kunt deze op volgende locatie downloaden: http://www.microsoft.com/en-US/download/details.aspx?id=8961.  1. Maak verbinding met uw database server. ...
    • BioStar 2 - How to update to a newer version

      BioStar 2 supports direct upgrade from the 2.5v to the latest version.  If your BioStar 2 version is 2.5v or higher, you can just download the latest version and conduct an upgrade.  However, you cannot upgrade from a very old version such as 2.0 to ...
    • BioStar 2 - How to delete blacklisted CSN cards

      What is a Blacklist? A list of cards that are denied for authentication on the BioStar device. When a card is lost or stolen, misuse can be prevented by registering the ID of the card in the blacklist. Why would you want to delete a blacklisted CSN ...