You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close

Creating a Database Backup of DW Spectrum IPVMS

https://hf-files-oregon.s3-us-west-2.amazonaws.com/hdpdigitalwatchdog_kb_attachments/2019/09-24/4763eb2b-7c2d-49d6-bfc0-47620cc0f150/image.png

Creating a Database Backup of DW Spectrum® IPVMS

-----------------------------------

Affected Roles:  Administrator, Owner

Related Digital Watchdog VMS Apps:  DW Spectrum® IPVMS

Complexity:  Medium

Software Version:  DW Spectrum® IPVMS v4.1 or higher

Last Edit:  March 23, 2021

-----------------------------------

What is a Database Backup?

DW Spectrum® IPVMS utilizes a database containing the user roles, device configurations, and other information to manage the system.  Each DW Spectrum® Server has its own database configuration.  However, a DW Spectrum® Server that shares a system with other Servers will share the same database configuration.  This can be useful if a system ever needs to recovered and restored.

This article will outline the different ways to create and copy a database backup and how to restore a system from a backup file.

Supported/Affected Devices:

  • DW Blackjack® Server Series

Automatic Database Backup

Once the DW Spectrum® Server is installed, the application will automatically create a database backup file every day without the need of user involvement.  The DW Spectrum® Server will ensure that there is at least 10 GB of free storage space available before creating a backup file.

Over time, the Server application will create six (6) days of database backups.  Once the Server has six (6) days of database backups, it will delete the oldest backup and create an updated backup file.  As a result, there will always be at least one backup file of the database.

By default, the database backup files will be saved in the Backup folder of the DW Spectrum® Server’s Media Server.

The automatic database files (.db) will display as “esc_<build_number>_<time_stamp>_timer”.

  • Windows Backup Location

C:\Windows\System32\config\systemprofile\AppData\Local\Digital Watchdog\Digital Watchdog Media Server\backup

  • Ubuntu/Linux Backup Location

/opt/dwspectrum/mediaserver/var/backup/

From the Backup directory, you can copy and save the database file locations at your discretion.

Related Articles

Manually Created Database Backup

While the DW Spectrum® IPVMS program will automatically create a database backup daily and when upgrading the DW Spectrum® Server software, the Administrator or Owner of the DW Spectrum® Server can create a database backup through the DW Spectrum® Client application.

To create a database backup:

  1. Using the Administrator or Owner user role, open the Main Menu ( ≡ ) and select System Administration (CTRL+ALT+A).

  1. The System Administration menu will display.

In the General tab, click the Create Backup button.

The Save Database Backup window will display.  Select the file directory where you would like to save the database backup file, assign the file a File_name, then click the Save button to create the backup file.

  1. Once the backup has been created, a confirmation message will display.

Copying the Raw Database

The DW Spectrum® Server will create and maintain raw database files in addition to its daily database backup.  When the DW Spectrum® Server program is running the Server relies on these raw database files for user information, device configurations, and recording license information.

In some special circumstances, such as when transferring a DW Cloud user database to a new Server computer, you may need to copy these raw database files.

**NOTE:  It is recommended to copy-and-paste database files, rather than simply moving the file to a different location.  The DW Spectrum® Server will look in its Digital Watchdog media Server folder when trying to start the Server.

Copying Raw Database Files in Windows

To copy the raw database from a DW Spectrum® Server in Windows:

  1. Stop the Media Server.

Right-click on the Media Server icon located in the Service Tray and select Stop Server (started).

  1. After stopping the Media Server, navigate to the Media Server folder.

Using the File Explorer, navigate to

C:\Windows\System32\config\systemprofile\AppData\Local\Digital Watchdog\Digital Watchdog Media Server

  1. Next, copy the files ecs.sqlite and ecs_static.sqlite

Paste the database files ecs.sqlite and ecs_staticsqlite to a safe location (e.g. USB drive, external drive, etc.).

  1. After copying the raw database files, you can start the Media Server again.

Right-click on the Media Server icon located in the Service Tray and select Start Server (stopped).

Copying Raw Database Files in Ubuntu/Linux

To copy the raw database from a DW Spectrum® Server in Windows:

  1. Open the Terminal (CTRL+ALT+T) application and use the following command to log in as a super user.

sudo su

            Press ENTER, then enter the root password of:

**NOTE:  The root password will not display as you type.

admin

  1. Next, stop the Media Server by using:

service digitalwatchdog-mediaserver stop

  1. After stopping the Media Server, navigate to the Media Server folder.

In the Terminal application, use the command:

cd /opt/digitalwatchdog/mediaserver/var

  1. Copy the raw files ecs.sqlite and ecs_static.sqlite to the Desktop.

In the Terminal application, use the commands:

cp ecs.sqlite /home/dwcube/Desktop

cp ecs_static.sqlite /home/dwcube/Desktop

**NOTE:  If you are using a different computer model than the DW Blackjack® Cube, then instead of “dwcube”, use the server’s model name.

  1. You now have the raw database files copied to the computer’s Desktop.

For Ubuntu/Linux systems, the permissions of the file must be changed.  In the Terminal application, use the commands:

cd /home/dwcube/Desktop

chmod 777 ecs.sqlite

chmod 777 ecs_static.sqlite

  1. You may now transfer the copies of the raw database files from the Desktop as needed.

After copying the raw database files, you can start the Media Server again.  Logged in as the super user/admin, use the command below to start the Media Server.

service digitalwatchdog-mediaserver start

Restoring From a Database Backup

Using the DW Spectrum® Client, an Administrator the Owner can restore a system using a database backup file (.db).

**NOTE:  If you are restoring a Server by using raw database files, you must copy-and-paste the ecs.sqlite and ecs_static.sqlite files in the same Digital Watchdog Media Server folder that they were copied from.

**NOTE:  If you are replacing a Server, it is recommended that you use the article Replacing A Server instead, as it contains additional steps and information for this process.

To restore a database using a backup file (.db):

  1. As the system Administrator or as the Owner, open the Main Menu ( ≡ ), then select System Administration (CTRL+ALT+A).

  1. The System Administration window will display.

Click on the Updates tab.

Ensure that the Server that is receiving the database backup is using the same firmware version as the original Server.  In this example, both Servers are running DW Spectrum v4.0.0.29990.

  1. Select the General tab and locate the Backup and Restore section.

Click the Restore from Backup button and select the DB Backup from the old Server.

Click Open to prompt the DB Backup restoration.

  1. The new Server will restart the DW Spectrum® Server program after restoring the System from the DB Backup.

  • 185
  • 24-Mar-2021
  • 893 Views