Backup and Restore the SQL Database

Backup and Restore the SQL Database

It is important to back up your CurrentWare SQL database to ensure that you retain your historical information from CurrentWare’s solutions such as BrowseReporter and AccessPatrol. There are a few ways to back up the CurrentWare database.

1. Backup Once

On the CurrentWare console, you can backup your CurrentWare database once manually.

  1. From the CurrentWare Web Console go to Tools > Database Backup Scheduler
  2. Click on “Run Backup Now
  3. The backup database is stored under C:\Program Files\Microsoft SQL Server\MSSQL14.MYPROD\MSSQL\Backup\

In the event that you receive the following message when attempting to run a backup "The database file is in use. Please shutdown all programs which are using the database file.", you will need to take a backup with SQL Management Studio.  SSMS can be downloaded Here.
Once installed use the following steps to take a backup of the SQL database.
  1. Launch SSMS (SQL Server Management Studio)
  2. Connect to your SQL Database Engine.  If using the default SQL Express you should see a prompt similar to the below image and can click the Connect button.
  3. In the Object Explorer pane expand the Databases folder by clicking on the plus to the left of the folder.
  4. Right-click on the SQL database for Currentware, (The default database name is CWNPSQL) select the Tasks menu item, and then select Back Up... from the sub-menu.
  5. The Back Up Database window should look like the below screenshot.  Take note of the path in the Destination section as this will be the path and filename for your backup.  Click on OK to begin the backup.
  6. When the backup completes successfully you will get the following message and your backup file will be in the path noted previously.  

2. Database Backup Scheduler

On the CurrentWare console, you can configure CurrentWare to back up the SQL database periodically.

  1. From the CurrentWare Web Console go to Tools > Database Backup Scheduler
  2. Check the option “Enable Scheduler”
  3. The backup path is set to the default SQL backup directory
  4. Set the frequency – daily, weekly or monthly
  5. Set the time, day or month
  6. Set the start time of the backup job

3. Restoring a SQL database using SSMS

  1. Turn off CurrentWare Server Services
  2. Run Microsoft SQL Server Management Studio
  3. Right-click on your CurrentWare SQL database
  4. Select Tasks then Restore
  5. Select the backup set you want to restore then select OK
  6. Start the CurrentWare Console or CurrentWare Server Services again.

4. Archive & Restore Database

Archiving the CurrentWare SQL database will back up the live database and replace the live database with a new one. This optimizes the performance of CurrentWare by reading and writing on a fresh database.

  1. Launch the CurrentWare Server Manager
  2. Type CWSM.exe on the start menu > Launch CWSM.exe
  3. On the CurrentWare Server Manager Database > Archive and Restore > Select Archive

The archived SQL Database will be saved and located in C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\Backup\Archive

5. Restoring an Archived Database

The procedure to restore the CurrentWare database depends on your back up method.
If you used the CurrentWare Server Manager to archive your database, you can restore the archived database from the CurrentWare Server Manager as well.

  1. Launch the CurrentWare Server Manager
  2. Type CWSM.exe on the start menu > Launch CWSM.exe
  3. On the CurrentWare Server ManagerDatabase > Archive and Restore
  4. Select an archived database from the drop-down menu > Select Restore

If you used a backup scheduler, you can use Microsoft SQL Server Management Studio to restore the database


I want to change the backup location

Please see this article to see the steps on changing where your CurrentWare database backup will go.


    • Related Articles

    • How To Backup Your SQL Database For Support

      Getting Your SQL Database Backup Sometimes the CurrentWare support team may request a copy of your database via a backup. This is usually rare and when handling your database the team follows a strict security protocol to ensure all data is secure. ...
    • Move the CurrentWare server to another computer with network SQL database

      When moving your CurrentWare software to a new server/PC you need to make sure you do not have both consoles connecting to the same networked database. Here are the steps to take. #1 Back up your existing cwServer Database Before you migrate your ...
    • How do I enable automatic database backup?

      On the CurrentWare console, you can configure CurrentWare to backup the database periodically. Go to Tools > Database Backup Scheduler To turn it on hit the checkmark beside Enable Scheduler. Select a path to store the database backup. Set the ...
    • Change the CurrentWare Database Backup Location

      Using the CurrentWare application to backup only gives you the option to use the default SQL folder backup location. The backup must be in the default folder for SQL to recognize it. This page will help you change the location for the backups. To use ...
    • Security & SQL Database Best Practices

      Security and Workflows Connection to the Web Console Starting with v8.0.1, the CurrentWare web console will have a preconfigured self-signed SSL certificate that is enabled by default. This will ensure that network communication to and from the ...