You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
Home > DW Product Help > Software Applications > DW Spectrum IPVMS > Server > DW Spectrum - Creating a Database Backup
DW Spectrum - Creating a Database Backup
print icon

Creating a Database Backup for DW Spectrum IPVMS

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

Affected Roles:  Owner

Related Digital Watchdog VMS Apps:  DW Spectrum IPVMS

Software Version:  DW Spectrum IPVMS v5.3

Last Edit:  May 20, 2024

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

 

What is a Database Backup?

When a new DW Spectrum System is created, the program creates a single, synchronized database containing critical system data such as user roles, device configurations, recording license registrations, and the archive index.

Each DW Spectrum Server has its own database configuration, however, DW Spectrum Servers that have been merged into a multi-server environment will share a single, synchronized database across all servers, meaning that all of the servers will use a copy of the same database file.

As the system database is an essential component for all servers, merged or individual, DW Spectrum includes a feature that allows the database to be exported and/or restored in the rare case of system failure.

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

 

**NOTE:  Only the DW Spectrum System Owner (admin) can create a Database Backup using the DW Spectrum Client.

**NOTE:  The System database does not include archives, server data, or local settings. However, it does include the archive index, which is used as a reference by the System when users call for video archive files when trying to view playback footage.

 

Important Administrative Note

When upgrading a server from an old major release version to the most recent build, please consider the following:

  • Do not skip major release versions. For example, if were to upgrade from Version 3.2 to Version 5.0 your recommended upgrade options include:
    • Follow the recommended upgrade path between major release versions:
      1. First, upgrade from DW Spectrum v3.2 > v4.2
      2. Then upgrade from DW Spectrum v4.2 > v5.2
    • Or perform a completely uninstall DW Spectrum then clean install a the desired version of DW Spectrum.
  • If you are upgrading directly to the next major release of DW Spectrum (e.g. 4.2 > 5.2), you do not need to go by any specific sequence.
  • Create a database backup between each upgrade before proceeding to the next major release version.

 

Automatic Database Backup

By default, DW Spectrum will automatically create a database backup file once every seven (7) days, whenever the product version is updated, and whenever Systems are being merged. If the backup is created automatically, the file is saved as a *.backup file.

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

The default database backup location is:

  • 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/

 

You can copy the database files from the Backup directory at your discretion.

The automatic database files (.db) will display as:

ecs_<build>_<timestamp>_<timer or update>

 

 

 

Manually Created Database Backup                             

While DW Spectrum automatically creates a database backup every seven (7) days, or when upgrading the DW Spectrum Server software, the Owner of the DW Spectrum Server can manually prompt a database backup using the DW Spectrum Client application.

To create a database backup:

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

 

  1. In the System Administration menu, click the Advanced tab and select “Backup and Restore”.

 

**NOTE:  Only the DW Spectrum System Owner (admin) can access the Backup and Restore menu in the DW Spectrum Client.

 

 

  1. Click on “Create Backup” and select the file directory where you would like to save the database backup file.

Assign a filename to the database backup, then click the Save button.

 

  1. Enter the Owner (admin) account password to create the backup.

DW Spectrum will confirm when the backup has been created. You can click on “Open Folder” to quickly open the file location where the backup file was saved.

 

Copying the Raw Database

The DW Spectrum Server will create and maintain raw database files in addition to automatic database backups.  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 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 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 and navigate to:

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

 

  1. Locate the raw database files titled as “ecs.sqlite and “ecs_static.sqlite”.

Copy and 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 superuser.

sudo su

           

Press ENTER, then enter the root password of:

Dw5pectrum

 

**NOTE:  DW Blackjack models that were sold prior to June 18, 2021, were distributed using the old (14.04, 16.04) super user login of "admin/admin" instead of the newer (as of 18.04) "dwuser/Dw5pectrum" login.

 

  1. Stop the Media Server with the command:

service digitalwatchdog-mediaserver stop

 

  1. After stopping the Media Server, navigate to the Media Server folder using 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 with the commands:

cp ecs.sqlite /home/<username>/Desktop

and

cp ecs_static.sqlite /home/<username>/Desktop

 

**NOTE:  For DW Blackjack products, the default “username” is generally “dwuser”, unless otherwise changed by the system owner.

 

  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/<username>/Desktop

 

chmod 777 ecs.sqlite

 

chmod 777 ecs_static.sqlite

 

  1. Transfer the copies of the raw database files from the desktop 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 with the command:

service digitalwatchdog-mediaserver start

 

Restoring From a Database Backup

In the event of replacing or rebuilding a DW Spectrum Server, the Owner can implement a Database Backup to help restore the system.

Options for deploying this include:

  • Copy and paste the raw database files (ecs.sqlite & ecs_static.sqlite) directly into the media server file directory.
  • Use the “Restore from Backup” function with the DW Spectrum Client.

 

**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 to the same Digital Watchdog Media Server folder that they were copied from.

**NOTE:  If you are replacing a Server, it is recommended that you refer to the article “DW Spectrum - Replacing A Server”, as it contains additional steps and information for the process.

 

To restore a database from a database backup file in the DW Spectrum Client:

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

 

  1. In the System Administration menu, click the Advanced tab and select “Backup and Restore”.

 

**NOTE:  Only the DW Spectrum System Owner (admin) can access the Backup and Restore menu in the DW Spectrum Client.

 

 

 

  1. Click “Restore from Backup” and select the database backup file (.db).

 

  1. A pop-up window will ask for confirmation to restore the database. Click “OK” and enter the Owner (admin) password to restore the database.

 

  1. The new Server will restart the DW Spectrum Server program after restoring the database.

 

 

 

For More Information or Technical Support

DW Technical Support:  866.446.3595

https://www.digital-watchdog.com/contact-tech-support/

______________________________________________________________________________

DW Sales:  866.446.3595                   [email protected]        www.digital-watchdog.com

scroll to top icon