System Backups

MVS Server supports the ability to take backups of the configuration data used for the system. This enables a user to create restore points for the system if anything ever needs to be recovered.

Backup and restore functionality is accessible on the System Administration page.

Backups contain all configuration for MVS Server and the IPM excluding the following data:

  • Images for Inspection Results, however the data for reach record is included (timestamp, employee, result, etc).
  • Information configured in the appsettings.json file
  • Kepware's Runtime Configuration (*.opf file)
  • License Information.

Backups are created and stored in a local directory on the system running MVS Server. This directory is configured in appsettings.json.

Create a Backup

To create a new backup, navigate to the System Adminstration page and click Create Backup. This will open the backup dialog, click confirm to start the backup process.

This process may take several minutes depending on the amount of data in your system. Once its complete it the new backup will be displayed on the page.

Uploading Backups

Due to a limitation on our webserver we don't support uploading backup files greater than 2GB. If the backup is greater than 2GB, its recommended to manually copy the file to the backup directory defined in the appsettings.json file. This is the same directory the server will use when creating new backups. Once the backup is copied to this location, refresh the System Administration page to see the backup in the list.

Restoring From Backup

To restore from backup click on the Restore button for the desired backup. A dialog will open confirming the restore operation. Note:

Warning - This process will wipe the current system and replace it with the configuration from the backup. - A restore operation can't be undone, so its recommended to take a new backup prior to any attempt to restore. - Restoring a backup requires a restart of the server, and the server will automatically shut down after completing the restore.

Manually Restoring a Backup

In case something has gone very wrong during the restore operation this section will help you manually restore from a backup from zip file. Its recommended that you have some SQL experience to complete the following steps:

  1. Extract the zip file. It should contain a workspaces folder and a database.bak file
  2. Copy the workspaces folder and its contents to the directory used to store Workspaces (This is defined in the appsettings.json file). Overwrite/replace all the existing files. ```json "WorkspaceSettings": { "FilePath": "C:\Runtime\Workspaces" },
3. Open up SQL Server Management Studio and locate the database used for MVS. This is typically called `MVSServer`, but is also defined in the connection string in the `appsettings.json` file.
4. Restore the database in SSMS using the `database.bak` file from the backup. Note: if the backup came from another machine, the user defined in the database might have a mismatched SID, to fix this execute the following SQL:

```sql
ALTER USER MVSServer
WITH LOGIN = MVSServer;
GO
  1. Copy the ConfigImages folder and its contents to the directory used to store raw Images (The root path is defined in the appsettings.json file and images will be stored in the Raw folder at that path). Overwrite all the existing files. json "ImagePath": "C:\\Runtime\\Images",