Automated Database Backup. Procedure to create an automated database backup using SQL management tools



Similar documents
How to Backup Your Eclipse.Net Database Automatically. To clearly document a specific automatic SQL database backup method for Eclipse.net.

Database Back-Up and Restore

Backing Up CNG SAFE Version 6.0

SELF SERVICE RESET PASSWORD MANAGEMENT BACKUP GUIDE

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

Spotlight Management Pack for SCOM

Dell Spotlight on Active Directory Server Health Wizard Configuration Guide

Dell Statistica Statistica Enterprise Installation Instructions

4.0. Offline Folder Wizard. User Guide

Dell Recovery Manager for Active Directory 8.6. Quick Start Guide

Protecting SQL Server Databases Software Pursuits, Inc.

How to Set Up a Shared SQL Express Database with ManagePro 7 Standard version

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

MANAGED SOFTWARE CENTER USER S GUIDE

TelePresence Migrating TelePresence Management Suite (TMS) to a New Server

BrightStor ARCserve Backup for Windows

Migrating Cirrus. Revised 7/19/2007

formerly Help Desk Authority Upgrade Guide

USING MICROSOFT ONEDRIVE FOR BUSINESS FOR MAC OS X USER S GUIDE

Dell NetVault Backup Plug-in for SharePoint 1.3. User s Guide

FaxCore 2007 Application-Database Backup & Restore Guide :: Microsoft SQL 2005 Edition

SAS 9.3 Foundation for Microsoft Windows

Dell InTrust Preparing for Auditing Microsoft SQL Server

Sophos Endpoint Security and Control How to deploy through Citrix Receiver 2.0

Dell Statistica Document Management System (SDMS) Installation Instructions

Introduction to Version Control in

BrightStor ARCserve Backup for Linux

HP OpenView Patch Manager Using Radia

Upgrade Guide. CA Application Delivery Analysis 10.1

Application Note - JDSU PathTrak Video Monitoring System Data Backup and Restore Process

Spotlight Management Pack for SCOM

FOR WINDOWS FILE SERVERS

Active Directory Change Notifier Quick Start Guide

Microsoft Dynamics GP. econnect Installation and Administration Guide Release 9.0

Lepide Event Log Manager: Installation Guide. Installation Guide. Lepide Event Log Manager. Lepide Software Private Limited

Digipass Plug-In for IAS. IAS Plug-In IAS. Microsoft's Internet Authentication Service. Installation Guide

Defender Delegated Administration. User Guide

Use QNAP NAS for Backup

Video Administration Backup and Restore Procedures

Dell Unified Communications Command Suite - Diagnostics 8.0. Data Recorder User Guide

Quest ChangeAuditor 4.8

Installing Sage SalesLogix on Microsoft Windows 8, Windows Server 2012, and Internet Explorer 10 Version Developed by Sage SalesLogix User

USING MICROSOFT ONEDRIVE FOR MAC OS X USER S GUIDE

Preparing Your Server for an MDsuite Installation

Symantec Backup Exec System Recovery Exchange Retrieve Option User's Guide

DSS Support Backup / Restore DSS Databases using Windows Backup Windows XP Windows 2003 Server

Symantec Backup Exec TM 11d for Windows Servers. Quick Installation Guide

Technical Notes. EMC NetWorker Performing Backup and Recovery of SharePoint Server by using NetWorker Module for Microsoft SQL VDI Solution

2.0. Quick Start Guide

BES10 Self-Service. Version: User Guide

CA ARCserve Backup for Windows

CA Cloud Service Delivery Platform

Symantec Enterprise Vault Technical Note. Administering the Monitoring database. Windows

Symantec Mail Security for Microsoft Exchange Management Pack Integration Guide

About Recovery Manager for Active

Self Help Guides. Setup Exchange with Outlook

CA Change Manager Enterprise Workbench r12

Self Help Guides. Create a New User in a Domain

Copy Tool For Dynamics CRM 2013

KEYWORDS InteractX, database, SQL Server, SQL Server Express, backup, maintenance.

How to Copy A SQL Database SQL Server Express (Making a History Company)

RDC-7 Windows XP Installation Guide

NetVault LiteSpeed for SQL Server version Integration with TSM

Business Portal for Microsoft Dynamics GP. Project Time and Expense Administrator s Guide Release 10.0

Banyon Data Systems BDS BACKUP VAULT

FOR SHAREPOINT. Quick Start Guide

Symantec Enterprise Vault Technical Note. Troubleshooting the Monitoring database and agents. Windows

Contivity Configuration Manager Tool Set

Dell NetVault Backup Plug-in for Hyper-V User s Guide

Omnicast Migration Guide 5.2. Click here for the most recent version of this document.

NetBak Replicator 4.0 User Manual Version 1.0

New Features and Enhancements

Project management integrated into Outlook

Symantec Backup Exec System Recovery Granular Restore Option User's Guide

ChangeAuditor. Migration Guide CA-MG

Promotion Model. CVS SUITE QUICK GUIDE 2009 Build 3701 February March Hare Software Ltd

Foglight. Foglight for Virtualization, Free Edition Installation and Configuration Guide

BlackBerry Enterprise Server Resource Kit BlackBerry Analysis, Monitoring, and Troubleshooting Tools Version: 5.0 Service Pack: 2.

Adobe Acrobat 9 Deployment on Microsoft Windows Group Policy and the Active Directory service

Quest ChangeAuditor 5.1 FOR ACTIVE DIRECTORY. User Guide

Foglight Managing SQL Server Database Systems Getting Started Guide. for SQL Server

HYPERION SYSTEM 9 N-TIER INSTALLATION GUIDE MASTER DATA MANAGEMENT RELEASE 9.2

Installation and Configuration Guide

Installing the BlackBerry Enterprise Server Management Software on an administrator or remote computer

Backup Procedures for IT Staff User Guide

NCD ThinPATH Load Balancing Startup Guide versions and 2.8.1

User Document. Adobe Acrobat 7.0 for Microsoft Windows Group Policy Objects and Active Directory

Dell One Identity Cloud Access Manager How to Configure for High Availability

Microsoft Dynamics GP. Audit Trails

How To Upgrade Your Microsoft SQL Server for Accounting CS Version

Security Analytics Engine 1.0. Help Desk User Guide

Lab 06: Experiencing Microsoft Lync Server 2013 Collaboration Features

Quick Connect Express for Active Directory

SysInfoTools MS SQL Database Recovery

Dell Spotlight on Active Directory Deployment Guide

Microsoft Business Contact Manager Version 2.0 New to Product. Module 4: Importing and Exporting Data

CA ARCserve Replication and High Availability for Windows

Dell One Identity Cloud Access Manager Installation Guide

Configuration Guide for SQL Server This document explains the steps to configure LepideAuditor Suite to add and audit SQL Server.

Transcription:

Automated Database Backup Procedure to create an automated database backup using SQL management tools Genetec Technical Support 6/29/2009

Notice This manual, and the software that it describes, is provided under license and may only be used or reproduced in accordance with the terms of such license, and may not be reproduced, stored or transmitted, in any form or by any means, electronic, mechanical, recording, photocopying or otherwise, without the prior written permission of Genetec Inc. The content of this manual is provided for information purposes only, is subject to change without notice, and does not imply a commitment by Genetec Inc. Genetec Inc. assumes no responsibility or liability for errors or inaccuracies that may appear in this manual. This document is protected by U.S., Canadian and International copyright law. Existing artwork or images may be protected under copyright law. The unauthorized use of such material in works not produced by Genetec Inc. or its associates could be in violation of the rights of the copyright owner. Please obtain any required permission from the copyright owner. All trademarks, trade names or company names referenced herein are used for identification only and are the property of their respective owners. Disclaimer To the maximum extent permitted by applicable law, Genetec Inc. and its suppliers disclaim any and all warranties and conditions, either express or implied, including, without limitation, implied warranties of merchantability, fitness for a particular purpose, title, and noninfringement, and those arising out of usage of trade or course of dealing, concerning these materials. These materials are provided as is at the licensee s own risk and peril without warranty of any kind. To the maximum extent permitted by applicable law, in no event shall Genetec Inc. or its suppliers (or their respective agents, directors, employees or representatives) be liable for any damages whatsoever (including, without limitation, direct, indirect, special, incidental, consequential, economic, punitive or similar damages, or damages for loss of business profits, loss of goodwill, business interruption, computer failure or malfunction, loss of business information or any and all other commercial or pecuniary damages or losses) arising out of the purchase or use of these materials, however caused and on any legal theory of liability (whether in tort, contract or otherwise) even if Genetec Inc. has been advised of the possibility of such damages, or for any claim by any other party. US Government restricted rights These materials are provided with RESTRICTED RIGHTS. Use, duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of The Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software-restricted Rights at 48 CFR 52.227-19, as applicable. 2

Table of Contents 1. General Information... 4 1.1. Document Revision... 4 1.2. Contacting Technical Assistance... 4 2. Backing up the Database... 5 2.1. Creating the Database Backup Script... 5 2.2. Automating the Database Backup... 8 2.3. Copy to a Network Share Location... 9 3. Restoring the database... 10 3

Automated Database Backup Procedure to create an automated database backup 1. General Information The Omnicast Directory service relies on the Directory database to store the system settings. In order to backup your system configuration (video parameters, video units, camera names, user privileges, alarm entities, recording parameters, connection types, etc.) you only need to backup the Directory database to a safe location. If ever a server failure or a database corruption should occur, restoring that database will be necessary to retrieve the previous system configuration. This document explains how to create an automated database backup according to a schedule. The next sections describe the steps for the Directory database but they could also be applied to the other Omnicast databases (alarms, video archives, metadata). 1.1. Document Revision Date Description 2007 08 01 Document creation 2009 06 29 Updating document with the new format 1.2. Contacting Technical Assistance Customers can reach Genetec s Technical Assistance Center (GTAC) using any one of the following methods: Log in to Genetec s Technical Assistance Portal (GTAP) http://www.genetec.com/english/support/login.aspx Send questions, via e mail, to: support@genetec.com Telephone questions to the GTAC at: 1 514 856 7100 or 1 866 338 2988 (Canada and US only) FAX questions to the GTAC at: 1 514 332 1692 From Monday to Friday, 8:00 AM to 8:00 PM (Eastern time, GMT 5h) No matter which method is used to reach the GTAC, customers should be ready to provide all relevant information describing the problem or question, including System ID and version information. 4

2. Backing up the Database 2.1. Creating the Database Backup Script For further SQL Server Express management options, it is necessary to download and install SQL Server Management Studio Express. The installation file can also be found at: http://msdn.microsoft.com/en ca/express/bb410792.aspx This is a free tool from Microsoft that will be used to create a script to backup the Omnicast database. 1. Once the tool is installed, launch Microsoft SQL Server Management Studio Express and connect to the OMNICAST instance. The server name is usually <server name>\<instance name>. In the screenshot below, the server name is ipicot and the instance name is Omnicast. 2. Once connected, expand Databases and you will see the Omnicast databases. 5

3. Right click the database you want to backup and select Tasks / Backup. 4. A dialog box appears allowing you to define different options such as what type of backup (full or differential) you want to do, backup destination, etc. Please note the difference between the Backup set name which is the name for the backup job and the Backup file name which can be specified when clicking the Add button. That file will be physically located on your hard drive. 6

5. Configure the available options as desired then click the Options page on the left hand column. Continue configuring options accordingly. For example, you may want to select overwrite all existing backup sets. 6. At this point, if you only want to perform a manual backup (one time), just click the OK button. The Progress panel will indicate the progression. 7. If you want to schedule an automated backup (scheduled), once all desired options are set, select Script / Actions to File and enter a desired file name for the script, for example, DirectorySQLBackup, and specify the location where to save the file. 7

This creates a.sql file which scripts the options you defined in the prior step. The contents of your.sql file may look like this: BACKUP DATABASE [DirectorySQL] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL$OMNICAST\Backup\DirectorySQL.bak' WITH NOFORMAT, NOINIT, NAME = N'DirectorySQL Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO To test your.sql file, run the following from a command prompt: sqlcmd S <enter server name>\omnicast i "C:\<enter path to.sql file>\directorysqlbackup.sql" After running the SQL script, the DirectorySQL.bak file will be created with the correct data and time stamp. By default the DirectorySQL.bak is located in C:\Program Files\Microsoft SQL Server\MSSQL$OMNICAST\Backup. (This folder might be MSSQL.1 or MSSQL.x depending on what else is on your server.) 2.2. Automating the Database Backup You can automate the backup process by creating a SQLCMD scheduled task as follows: 1. First, create a Scheduled Task to automate the.sql script created above. Use the Scheduled Task Wizard (Start / All Programs / Accessories / System Tools / Scheduled Tasks). 2. When asked to select a program, browse to C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD.exe. 3. Define the Schedule Task parameters accordingly and click Finish. 4. Go the properties of the newly created Scheduled Task and edit the Run command as such: 8

"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE" S <enter server name>\omnicast i "C:\<enter path to.sql file>\directorysqlbackup.sql" 2.3. Copy to a Network Share Location If desired, create a simple batch file to copy the DirectorySQL.bak from the local server to a network share located on server being backed up regularly. For example, create a text file named CopyDirectorySQL.cmd with the following contents: copy "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\DirectorySQL.bak" "\\<servername>\<sharename>\" Lastly, create a simple Command Prompt Scheduled Task and configure accordingly. Make sure to run this Scheduled Task after the SQLCMD Scheduled Task. Go to the properties of the newly created Scheduled Task and edit the Run command to point to the location of CopyDirectorySQL.cmd file (or your respective batch file name). 9

3. Restoring the database Should a failure to occur, you might need to restore the Directory Database from the backup set you created. You can easily restore the database by using the following procedure: 1. The first step for restoring the database is to stop the Omnicast Directory service. You can do it from the Server Admin by clicking the Stop button. We also recommend stopping the Gateway and the Directory Failover Coordinator services. If ever the services are restarted by the WatchDog, simply stop them again. 2. Launch Microsoft SQL Server Management Studio Express and connect to the OMNICAST instance. 3. Right click the database you want to restore and select Tasks / Restore / Database. 10

4. Normally, the source for restoring can be left to From database. Make sure to have the right backup set selected: 5. Alternately, you can also choose to restore From device and manually browse to a backup set file. In that case, you will have to specify the backup location by clicking the Add button: 11

6. Once you click OK to select the file, the Backup set content will be displayed. Choose the backup date you want to restore: 7. Once the correct restore source has been chosen, click OK to start the restore operation. The Progress panel will indicate the progression: The database has now been restored. Start the Omnicast services and verify your settings by logging to the Config Tool. 12