Scout Diagnostics Database Backup and Recovery Guide P H 803. 358. 3600 F A X 803. 358. 3636 WWW.AVTECINC.COM 100 I N N O VAT I O N P L ACE, L E X I N G T O N SC 29072
Copyright 2013 by Avtec, Inc. All rights reserved. This document contains proprietary information that is protected by copyright. No part of this document may be reproduced, stored in a retrieval system, or transmitted in any form or any means electronic, mechanical, photocopying, recording or otherwise, without the prior written consent of Avtec, Inc. Scout, VPGate, Outpost, Frontier, DSPatch, and DSPatchNET are trademarks of Avtec, Inc. All other brands and their products are trademarks or registered trademarks of their respective holders and should be noted as such. The material in this document is for information only and is subject to change without notice. While reasonable efforts have been made in the preparation of this document to assure its accuracy, Avtec, Inc. assumes no liability resulting from errors or omissions in this document, or from the use of the information contained herein. Avtec, Inc. reserves the right to make changes in the product design without reservation and without notification to its users. COMPANY INFORMATION Avtec, Inc. 100 Innovation Place Lexington, SC 29072 USA Release Date December 2013 Confidential ii
Contents Overview 1 Best Practices 1 Backup Options 2 Requirements 2 Creating a Backup Job 2 Initiating a Backup 4 Restoring a Backup 4 Verifying the Database After Recovery 6 Confidential iii
Overview Database backups are an important part of any database disaster recovery strategy. A valid, restorable database backup is crucial when the moment comes to execute a real disaster recovery scenario during a hardware failure downtime. The Scout Diagnostics Database Backup and Recovery Guide offers guidance in using third party database backup software to protect data by providing the ability to schedule regular, automatic backups that occur without stopping data collection as well as restore a backup with minimal data loss. Avtec has tested database backup and recovery using SQL Backup Master, the free SQL database backup software which is downloaded from http://www.sqlbackupmaster.com/. Using a simple, straight-forward process, "SQL Backup Master" creates, compresses, and stores database backups. Note: While Avtec has tested with "SQL Backup Master" and this document describes database backup implementation using "SQL Backup Master," Scout Diagnostics is expected to be compatible with other database backup and recovery software tools that support SQL database backups. The following steps are the high level tasks necessary for implementing a database backup and recovery strategy. The sections that follow provide details for performing a full backup using SQL Backup Master. See "Creating a Backup Job" on page 2. See "Initiating a Backup" on page 4. See "Restoring a Backup" on page 4. See "Verifying the Database After Recovery" on page 6. Best Practices Avtec recommends the following best practices when implementing a Scout Diagnostics database backup and recovery plan: Store backups in a separate physical location or drive than the production database files so that these backups are available if your physical drive fails. Placing the data and backups on separate devices also enhances the I/O performance for both writing backups and the production use of the database. Do not create logical volumes or partitions out of your physical disk drive for backup media. Establish a proper backup schedule based on application needs and business requirements. o o 500MB-1GB database size: Perform a complete database backup every night during a nonoperational window or when data traffic is at its minimum. 1-10GB database size: Perform a complete database backup every night; perform differential backups every 4 hours during an off-peak time of the day; perform transactional log backups every 60 minutes. Perform a restore of a backup on a test server to verify the restore with all the options and conditions necessary during planned or unplanned downtime. Confidential 1
Backup Options Most third party database backup applications support three backup types: Full, Differential and Transaction Log. Full Backup Contains the entirety of the database at the point of backup. Differential Backup Contains only database information changed since the last full backup. Transaction Log Backup Contains transaction logs. While many different combinations of these three types can be configured, Avtec recommends a simple model, which is SQL Backup Master's "Daily Simple" plan selection of the Full Backup option. This backup plan is a snapshot in time and contains no differential or transaction log backups. During this simple backup process, active data collection continues; however, once backup begins, no data collection is sent to the backup. While this model requires the least administration, data is recoverable only to the most recent full database backup. Important: The 'simple' model is not the best choice for production systems where data loss of recent changes is unacceptable. To minimize data loss, consider one of the more extensive differential backup schemes. Requirements The following are required prior to performing any backups. Installation of SQL Backup Master Version 1.0.118.0 or later (http://www.sqlbackupmaster.com/) on the computer that hosts the SQL Server instance you wish to back up. Note: Avtec has tested only the free version of the product. Connectivity to a remote drive location of SAN/NAS. If the production database resides on a SAN, Avtec recommends that you store the backup on a different SAN. A raided SAN is recommended for backup data integrity. The use of a domain or local administrator account for the target drive machine as well as the originating server. A SQL username and password with rights to perform backups. During installation, Avtec provides a username of AvtecBackup with a password of Avtec!Backup pre-installed into the Scout Diagnostics database. This is a limited username for performing backups only. Note: The use of the Avtec pre-installed user, AvtecUser, is also allowed. This is an elevated user that is pre-installed on every instance of Scout Diagnostics. Creating a Backup Job Once the product (SQL Backup Master) is properly installed, create a backup job detailing a scheduled time, originating database (AVTECDiagDb) and a destination target or backup location. Confidential 2
1. In SQL Backup Master, select Create New Database Backup to initiate backup configuration. The Database Backup Editor dialog displays. 2. Select Choose SQL Server. The Connect to SQL Server dialog displays. 3. Select the Connect using the following SQL Server account radio button. 4. Enter the pre-installed Username AvtecBackup. 5. Enter the pre-installed Password Avtec!Backup. Note: Avtec installs this limited user into the Scout Diagnostics database to be used to log in and perform backups only. 6. Click OK. AVTECDiagDB then displays in the Source column. 7. Select the box to the left of AVTECDiagDB. 8. Choose a destination for your backup by selecting Add in the Destinations section on the right. The Choose Destination dialog displays. 9. Select Local or Network Folder and click Select. The Folder Destination Settings dialog displays. 10. Specify a backup location on the network with either a mapped drive, IP and share address, or machine name (Example: \\NetworkServer101\C$\Backups). Note: For network servers, insure a valid user account has write access to the network share. This can be a domain or local account. 11. Select the number of days versions should be kept before deletion. 12. Click OK. 13. In the Configuration section on the Database Backup Editor, click the Schedule hyperlink to adjust the scheduling. The Backup Job Schedule dialog displays. Note: For most installations, Avtec recommends a simple backup and restore procedure. 14. Click on Load a Preset Backup Plan and select Daily Simple. This sets the schedule to perform a full backup every 24 hours with no differential or transaction log backup. Note: You may adjust the 24-hour duration based on your needs. Confidential 3
15. Click Save. 16. To have the system notify you regarding backup operations, select the Email Notifications link. The Backup Job Settings dialog displays. 17. Select the checkbox next to Send Email Notifications. 18. Make your selections and fill in the required fields, then click Save. Note: Avtec recommends enabling email for success or failure. Test the connection and setup by sending a test email and verifying it arrives. 19. In the Backup Name field, enter a name for your backup job. 20. Describe the backup job in the Description field. 21. Click Save. The backup configuration is fully complete. Note: You can check the status of previously run backup and restore jobs at any time by selecting View Database Backup Log from the Backup and Restore tab. This displays successes, warnings, errors and debug information regarding the selected database backup. Initiating a Backup Your backup performs automatically based on the schedule in your backup configuration. You can also initiate backups by performing them manually. 1. In SQL Backup Master, from the Backup and Restore tab, select Back up now from your selected backup job. Once the backup completes, your selected backup screen updates the Status, Summary, and Last Run, and if configured, you receive the optional email containing a full description of the backup statistics. 2. Validate the backup destination by verifying the presence and size of the database backup file. Note: Inbound data traffic from production calls continues during the backup process. Restoring a Backup During the restore process of this "simple" database backup and recovery plan, data collection halts. Changes that occur after the most recent backup are not recoverable. In the event of a disaster, those changes must be redone or are lost. Important: You must stop the ASP Collector Service before performing the restore procedure. Also, make sure the SQL Express service is running when performing the restore. Confidential 4
Note: This is a simple backup/recovery scheme and only replaces the corrupted database with the last database image. Perform the following steps to restore your database from a backup: 1. Navigate to the Diagnostics tab of Scout Diagnostics configuration webpage and click STOP to stop the ASP Collector Service. 2. In SQL Backup Master, from the Backup and Restore tab, select Recover from your selected backup job. The Database Backup Recovery Explorer dialog displays listing all of the currently available backup images. Note: Backup images that are not yet completed are not shown. 3. Select Recover next to the database name you would like to restore. The Recover Database dialog displays indicating the target database AVTECDiagDB. Note: Insure you are using an administrative account that enables both read and write from the SQL instance as well as the destination folders. If not, your backup images may not display and you may receive an authentication error. 4. Select the radio button for RESTORE WITH RECOVERY to insure any pending transactions do not roll into the new database. Confidential 5
Note: This simple restore does not attempt to merge backup data with current customer records made after the last backup. This restore process deletes all customer data created since the last valid backup. 5. Click Begin Recovery. The following Confirmation dialog displays. 6. Click Yes to proceed. 7. Once database restore completes successfully, navigate to the Diagnostics tab of the Scout Diagnostics configuration webpage and click START to restart the ASP Collector Service. Verifying the Database After Recovery Once the ASP Collector Service restarts and normal production operation commences, verify that the Scout Diagnostics operation is performing correctly by navigating to the Scout Diagnostics webpage and generating several reports. These reports should render with minimal wait time. Confidential 6