MS SQL® Database Maintenance

Full DB Backup and Restore

The NGA Database Backup feature is an operation to backup (and if required, restore) the complete database(s) used by NGA and is therefore specific to the DB used InfluxDB® and SQLServer®.

Note:
The backups are based on online backup features of the underlying databases and do not require a shutdown of the database and / or the WinCC OA project. Note that the performance of the database will be reduced while the backup is active.

There is no WinCC OA panel to perform the backup / restore operation and instead sample scripts (cmd or shell scripts) are provided for this purpose.

These are scripts that do a full backup of the current state of the database. These can be used when data is lost for some reason:

Other WinCC OA Backup Options

  • The Settings Tabis to recreate a WinCC OA project in case of data loss or other fatal situations (hardware fault, unwanted manual deletion of data, ...). The online backup is a complete backup of a WinCC OA project. Note that this backup does not include the history database.
  • The Segment backup integrated in the NGA (see Extended Settings - Database-specific Configuration) can be used for restoration of historic data which has already been deleted due to retention settings ("lifetime" of data).

.

MS SQL® Commands

The backup commands are available for MS SQL®. The command can be used for cmd and sh. This chapter describes the MS SQL® commands.

MS SQL®: backupMSSQLServer.cmd [<command> <argument>] <MSSQLServer-backup-path>

Command Description
--database Database to be backed up (the default is "winccoa").
--max-backup-count Number of backups kept (the default is 3).

MS SQL®: restoreMSSQLServer.cmd [<command> <argument>] <MSSQLServer-backup-path>

Command Description
--database The database to be restored (the default is "winccoa").
--backup The backup folder name (e.g. 20211021-133236.bak) inside <MSSQLServer-backup-path> (the default is the newest backup).