Database Back-Up and Restore



Similar documents
Backing Up CNG SAFE Version 6.0

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

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

If you have questions or need assistance, contact PCS Technical Services using the contact information on page 10.

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

Notes Transfer instructions INTRODUCTION More information

ilaw Installation Procedure

Moving the TRITON Reporting Databases

Backup / migration of a Coffalyser.Net database

Installing LearningBay Enterprise Part 2

Table of Contents. RFMS SQL Backup

Migrating Trend Micro Mobile Security for Enterprise (TMMS) 8.0 to TMMS 9.0

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

How To Upgrade Your Microsoft SQL Server for Accounting CS Version

Video Administration Backup and Restore Procedures

NetVanta Unified Communications Server Backup and Restore Procedures

SplendidCRM Deployment Guide

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

Microsoft SQL Server 2005 How to Create and Restore Database (GRANTH3) Manually

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

RFMS, INC. Reference Library Documentation. Version 10 Conversion Manual. Microsoft SQL

How to Back Up and Restore an ACT! Database Answer ID 19211

InformationNOW SQL 2005 Database Backup and Restoration

Installation Manual Version 8.5 (w/sql Server 2005)

Migrating MSDE to Microsoft SQL 2008 R2 Express

Moving the Web Security Log Database

Moving a Romexis Database to an Existing SQL Instance

WINDOWS SERVER 2008 OFFLINE SYSTEM RECOVERY USING WINDOWS SERVER BACKUP WITH NETWORKER

1. CONFIGURING REMOTE ACCESS TO SQL SERVER EXPRESS

How to schedule and automate backups of SQL Server databases in SQL Server Express Editions

SELF SERVICE RESET PASSWORD MANAGEMENT BACKUP GUIDE

Juris Installation / Upgrade Guide

Upgrading from MSDE to SQL Server 2005 Express Edition with Advanced Services SP2

GO!NotifyLink. Database Maintenance. GO!NotifyLink Database Maintenance 1

Protecting SQL Server Databases Software Pursuits, Inc.

Microsoft SQL Server 2005 How to Create and Restore Database (GRANTH3) Manually

Database Server Maintenance Plan

TECHNICAL NOTE. The following information is provided as a service to our users, customers, and distributors.

MS SQL Server Database Management

Migrating Mobile Security for Enterprise (TMMS) 8.0 to version 9.0

Setting Up ALERE with Client/Server Data

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Backup Procedures for IT Staff User Guide

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

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

QUANTIFY INSTALLATION GUIDE

Ascent Capture's MSDE 2000 Backup and Restore Instructions (For Ascent Capture 7.x and 6.x using the default MSDE 2000 database)

How to Backup and FTP your SQL database using E2.

Database Migration and Management Guide v15.0

How to Reinstall SQL Server 2005

WhatsUp Gold v16.0 Database Migration and Management Guide Learn how to migrate a WhatsUp Gold database from Microsoft SQL Server 2005 Express

BSDI Advanced Fitness & Wellness Software

E-Notebook SQL 12.0 Desktop Database Migration and Upgrade Guide. E-Notebook SQL 12.0 Desktop Database Migration and Upgrade Guide

VERITAS Backup Exec 9.1 for Windows Servers Quick Installation Guide

Microsoft SQL Server Scheduling

ProSystem fx Document

ecopy ShareScan 5.0 SQL installs guide

TMS Database Knowledge Tips

InformationNOW SQL 2008 Database Backup and Restoration

Automated backup. of the LumaSoft Gas database

Sitecore Ecommerce Enterprise Edition Installation Guide Installation guide for administrators and developers

SQL Tuning and Maintenance for the Altiris Deployment Server express database.

WhatsUp Gold v16.2 Database Migration and Management Guide

NovaBACKUP xsp Version 15.0 Upgrade Guide

Use of Commercial Backup Software with Juris (Juris 2.x w/msde)

Symantec Backup Exec 12.5 for Windows Servers. Quick Installation Guide

1.0 Doors.Net Database Backup Microsoft SQL Server 2005 Studio Express

Assured PackOut Best Practices: Create a Back-Up

Support Document: Microsoft SQL Server - LiveVault 7.6X

Technical Bulletin. SQL Express Backup Utility

VERITAS Backup Exec TM 10.0 for Windows Servers

You may have been given a download link on your trial software . Use this link to download the software.

Basic SQL Server operations

e-business Suite Server Install Guide

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

How to protect, restore and recover SQL 2005 and SQL 2008 Databases

SonicWALL CDP 5.0 Microsoft Exchange InfoStore Backup and Restore

How To Backup Your Computer With A Remote Drive Client On A Pc Or Macbook Or Macintosh (For Macintosh) On A Macbook (For Pc Or Ipa) On An Uniden (For Ipa Or Mac Macbook) On

How to Create a Delegated Administrator User Role / To create a Delegated Administrator user role Page 1

9. Database Management Utility

for Networks Installation Guide for the application on the server August 2014 (GUIDE 2) Lucid Exact Version 1.7-N and later

ilaw Server Migration Guide

Installation & Maintenance Guide

Jolly Server Getting Started Guide

Installing RMFT on an MS Cluster

ArcGIS Server and Geodatabase Administration for 10.2

How To Install A New Database On A 2008 R2 System With A New Version Of Aql Server 2008 R 2 On A Windows Xp Server 2008 (Windows) R2 (Windows Xp) (Windows 8) (Powerpoint) (Mysql

4cast Server Specification and Installation

User Guide. Database Backup Procedures for MS SQL Server 2005 Express

Bosch ReadykeyPRO Unlimited Installation Guide, product version 6.5. This guide is item number DOC , revision 2.029, May 2012.

Installing and Configuring Login PI

Server Installation: ServerTools

WhatsUp Gold v16.1 Database Migration and Management Guide Learn how to migrate a WhatsUp Gold database from Microsoft SQL Server 2008 R2 Express

4cast Client Specification and Installation

E-Notebook SQL13.0 Desktop Migration and Upgrade Guide

Enterprize Setup Checklist

Sage Intelligence Financial Reporting for Sage ERP X3 Version 6.5 Installation Guide

VMware vcenter Configuration Manager Backup and Disaster Recovery Guide vcenter Configuration Manager 5.7

Restoring Sage Data Sage 200

Moving a CIMPLICITY SQL Database using Detach/Attach Proficy HMI/SCADA CIMPLICITY

Transcription:

Database Back-Up and Restore Introduction To ensure the data held in People inc. is secure regular database backups of the databases must be taken. It is also essential that the procedure for restoring these backups is understood and that this procedure is tested from time to time to ensure that it works. It is easy to assume that because the People Inc. databases are stored on a server that they are automatically backed-up every night. In practice, it is not uncommon for users to find that this is not the case and that when needed, restoring a back-up of the databases is more difficult than they expected it to be. Users should therefore: Make sure they understand exactly what the current arrangements for backups are. Make sure they know how often database back-ups are taken and for how long they are kept Make sure they know what step are taken to ensure the security of the back-up media Make sure that they know the procedure and time required to restore database backups If possible arrange for a practice restore to make sure the procedure works Users may have to ask for the database backup arrangements to be changed if they feel their data is not backed-up regularly enough, or that the back-ups are not kept for long enough. This document is intended only as a guide. While at P&A Software we endeavour to provide advice and help where the security of the data held in our systems is concerned, it is the responsibility of the client s IT support team to ensure the security and integrity of the computer environment used by system users. P&A Software to not support the SQL Server database software; the client s IT staff should ensure that they have the skills, knowledge and resources to do this. In particular, from time to time Microsoft may update or release new versions of SQL Server. P&A Software do not undertake to keep this document complete or upto-date with respect to these changes. The client s IT support team are responsible for locating and understanding any version-specific information associated with the configuration of back-ups on their server. Note that while none of the utilities provided by P&A Software work in this way, it is possible to create database back-up files that each contains a number of backup copies of one database (taken over time). We recommend that this approach is not taken. If backup files have been created in this way, not only is it essential that care is taken to restore the correct backup from the file (as it will contain many copies of the same database), but also that the corresponding backup (from the same day/time) is retrieved from the similar backup files for the other PI databases. Note that it is not possible to use the P&A Software utility for restoring backup files (Maintenance Manager) in conjunction with backup files of this type. Page 1 of 16 Version 1.2, revised July 2010

Creating Database Backups There are a number of options available to users when setting up backups. This document details these options. These are: Creating back-ups using the System Administrator module (ad-hoc/one off back-ups) Creating back-ups from SQL Server 2005 (regular/scheduled back-ups) Running a back-up script with SQL Express/MSDE 2000 (regular/scheduled back-up) The People Inc. system manages information within a number of SQL Server databases. The standard system uses 4 databases, but it is possible to use just 3, and some installations may have more (depending on the number of user databases defined). All of the databases have to be backed-up at the same time to generate a valid back-up copy of the system (and these files have to be kept together as a set). A full People Inc. database back-up contains all user data, together with screen, table, letter and report definitions; in fact everything needed to recover the system. If it is necessary to restore a backup an entire set of database backups from a particular date must all be restored. It is not possible to create a backup of your system by copying the live database files themselves. This is because these files are permanently in use (unless the server is first stopped). The following approaches can be taken. Creating database back-ups using People Inc. This approach is recommended for one-off or ad-hoc back-ups. To create a full back-up of the People Inc. databases from the system itself, open the System Administrator module, right-click on the System Maintenance node in the Management Console and select System Maintenance and follow the steps of the back-up wizard. Page 2 of 16 Version 1.2, revised July 2010

Note: the backup option is not available in the Management Console in the main People Inc. system; backups can only be created from the System Administrator module. Select shared data and all other databases. When back-ups are created in this way, the backup files are created in the folder assigned for backups within People Inc.; by default the files are created in the folder: C:\Program Files\PA Group\People Inc\Backup The path to the back-up folder can be checked using the Options > Show Backup Path menu item in the system administrator. This location can be modified using the Maintenance Manager utility. Note that backups created in this way are saved in this folder on the database server This is not normally the same computer that the user uses to access the system and users will not normally be able to see this folder from their PC. The following back-up files are generated when backing up a newly installed system. Page 3 of 16 Version 1.2, revised July 2010

The files produced by a backup are a back-up set and should be kept together, and restored as a set. Note that a backup set may have more than 4 files. To keep the back-up safe, copy the files produces to a suitable back-up device (tape or CD). It is recommended that the back-up is labelled with the system/database version (for example 3.4.2.101 ). The version number can be found by selecting help>about on the People Inc. menu. It is only possible to restore a back-up of a particular database version onto a system with the same version number. Note that, when a back-up is restored, all existing data and screen/letter/report definitions are replaced with the copies held in the backup. Automating back-ups using SQL Server 2005 This approach is recommended for regularly, daily or weekly back-ups. For users managing their databases using a full copy of SQL Server, backups can be automated using the Maintenance Plans facility within SQL Server management studio. To set up a Maintenance Plan, right-click on Maintenance Plans and select Maintenance Plan Wizard. Page 4 of 16 Version 1.2, revised July 2010

The following screen is displayed The wizard enables you to choose which databases will be backed up and also to set a schedule. Enter the server name and select Windows Authentication Select Next Page 5 of 16 Version 1.2, revised July 2010

The following screen is displayed Select Back up database (full) and press next. Press next. Page 6 of 16 Version 1.2, revised July 2010

The following screen is displayed Select the databases to be backed up. In the standard system these are: redpi002_1, redpi002_2, redpi002_master, redshared30 (you may have further redpi002_x databases). Press OK. Page 7 of 16 Version 1.2, revised July 2010

The same screen now allows you to select the path and extension for the backup files produced. The extension should be left as bak. Press Next. Page 8 of 16 Version 1.2, revised July 2010

Press change (in the screen above) You now should create the schedule for the Maintenance Plan. Press change (in the screen above) and configure the schedule. Page 9 of 16 Version 1.2, revised July 2010

The next screen (not shown) is for configuring an optional report on the backup procedure, complete this screen and press finish. The final screen confirms that you Maintenance Plan was configured successfully. Note that the files created when running a back-up using SQL Server can contain multiple back-ups (of the same database). If the user wishes to use the data-restore functionality provided with People Inc. (recommended), they should ensure that back-up files only contain a single database backup. To do this, reselect the option re-format the back-up file each time a back-up is created. Page 10 of 16 Version 1.2, revised July 2010

Back-ups of databases running under SQLEXPRESS (2005) This backup method is only appropriate for MS SQL Server 2005 Express. The user must download and install SQL Server 2005 Management Studio Express before implementing this approach to database backup. This is a free tool from Microsoft and will be used to create a script to backup the People Inc. databases. Launch Microsoft SQL Server Management Studio Express and connect to the SQL Server instance that hosts the People Inc. databases (this is normally the \SQLEXPRESS instance). Expand the Databases node; this will display a list of databases including the People Inc. databases. Right click the first database and select Tasks > Backup. A dialog box appears enabling the user to configure backup options (type of backup, backup destination etc.). Select the desired options and then click the Options page (from the list on the left-hand side). Select further options (for example, Overwrite all existing backup sets). Once all options are set, select Script > Action to File and enter a desired file name, for example, DatabaseBackup, and specify a location to save the file. This creates a.sql file (DatabaseBackup.SQL) which scripts the options defined above. Page 11 of 16 Version 1.2, revised July 2010

The contents of the DatabaseBackup.SQL file will look like this: BACKUP DATABASE [redpi002_1] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\redpi002_1.bak' WITH NOFORMAT, NOINIT, NAME = N'redpi002_1-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO To test the DatabaseBackup.SQL file run the following from a command prompt. sqlcmd -S.\SQLEXPRESS -i "C:\<path to DatabaseBackup.sql file>\databasebackup.sql" If the redpi002_1.bak file was created with the correct data and time stamp then you know your script works. By default the redpi002_1.bak is located in: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\ You can automate the backup process by creating two Scheduled Tasks. SQLCMD Scheduled Task First, create a Scheduled Task to automate the.sql script created above. Use the Scheduled Task Wizard and when asked to select a program browse to use browse to C:\Program Files\Microsoft SQL Server\90\Tools\binn\ SQLCMD.exe. Define the Schedule Task parameters accordingly and click Finish. Go the properties of the newly created Scheduled Task and edit the Run command as such. C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE" -S.\SQLEXPRESS -i C:\Program Files\Microsoft SQL Server\DatabaseBackup.sql Copy redpi002_1.bak Scheduled Task Next, create a simple batch file to copy the redpi002_1.bak from the local server to a network share located on server being backed up regularly. For example, create a file named, Copy redpi002_1bak.cmd, with the following contents. copy "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\ redpi002_2.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 Copy redpi002_1bak.cmd (or your respective batch file name). Repeat the process for all People Inc. databases. Page 12 of 16 Version 1.2, revised July 2010

Back-ups of databases running under MSDE 2000 This is an alternative approach designed for users who manage their databases using MSDE 2000. To automate backups, it is recommended that the following script is run within MSDE using a utility called OSQL. exec sp_dropdevice 'redshared30_backup', 'DELFILE' go exec sp_addumpdevice 'disk', 'redshared30_backup', 'd:\backups\redshared30_backup.bak' EXEC ('BACKUP DATABASE [redshared30] TO [redshared30_backup] WITH FORMAT, NOUNLOAD, NAME =''redshared30 backup'', STATS = 100, DESCRIPTION = ''redshared30backup''') go exec sp_dropdevice 'redpi002_1_backup', 'DELFILE' go exec sp_addumpdevice 'disk', ' redpi002_1_backup', 'd:\backups\ redpi002_1_backup.bak' EXEC ('BACKUP DATABASE [redpi002_1] TO [redpi002_1_backup] WITH FORMAT, NOUNLOAD, NAME ='' redpi002_1 backup'', STATS = 100, DESCRIPTION = '' redpi002_1backup''') go exec sp_dropdevice ' redpi002_2_backup', 'DELFILE' go exec sp_addumpdevice 'disk', ' redpi002_2_backup', 'd:\backups\ redpi002_2_backup.bak' EXEC ('BACKUP DATABASE [redpi002_2] TO [redpi002_2_backup] WITH FORMAT, NOUNLOAD, NAME ='' redpi002_2 backup'', STATS = 100, DESCRIPTION = '' redpi002_2backup''') go exec sp_dropdevice ' redpi002_master_backup', 'DELFILE' go exec sp_addumpdevice 'disk', ' redpi002_master_backup', 'd:\backups\ redpi002_master_backup.bak' EXEC ('BACKUP DATABASE [redpi002_master] TO [redpi002_master_backup] WITH FORMAT, NOUNLOAD, NAME ='' redpi002_master backup'', STATS = 100, DESCRIPTION = '' redpi002_masterbackup''') go exit This script can be called from a batch file by using the command: osql -Usa -Ppassword -ibackup_script.sql -obackup_log.log where password is the password of the SA account on the server Page 13 of 16 Version 1.2, revised July 2010

Restoring Database Backups Restoring database back-ups using Maintenance Manager Restoring People Inc. databases enables users to undo changes made in the system, for example if the user wishes to recover data that has been inadvertently overwritten or modified. We recommend that users restore databases using the Maintenance Manager utility. When backups are restored in this way, data, screen definitions, letter and report templates, user accounts and preferences are all overwritten. In addition the Maintenance Manager utility creates any missing databases and configures the correct login details within SQL Server. A copy of this utility can be found in the tools folder on the installation CD. Note that the version of Maintenance Manager used should match the version of People Inc. Any set of People Inc database back-up files can be restored onto SQL Server using the Maintenance Manager utility. A backup set will consist of a back-up of the redshared30 database, a backup of the master database, and individual back-ups of any user databases. A new installation of People Inc. has 2 user databases, but user may create more databases as they use the system. To avoid potential problems, People Inc. backups should always be restored as a complete set; individual database backups within a set should never be substituted for a database backup from another backup set. Before restoring databases, check the dates of the back-up files to make sure they were created at the same time. If the backups were created using SQL Server, it may be necessary to change the backup names (to those in the image below) before restoring them using the Maintenance Manager (this utility will not work if the back-up files have been given different names). Back-up created using the People Inc. System Administrator are automatically given these names. Users should also note that, if the back-up files were created using SQL Server (rather than the System Administrator), each physical file may contain more than one back-up. If these files are used, the Maintenance Manager utility will restore the first back-up in the back-up file (for each database). This is normally not what the user requires. In this situation, the restore must be done using SQL Server itself and the most recent back-up selected manually from each of the files. Page 14 of 16 Version 1.2, revised July 2010

The Maintenance Manager utility can be used with all versions of SQL Server. The Maintenance Manager utility should be run on the database server (if possible from the console rather than via any remote access software such as Windows Remote Desktop) To start the Maintenance Manager utility, run PSPMaintenanceManager.exe. There are 2 possible Authentication options. In the first instance, try to use Windows Authentication; this will use your Windows account details to log into SQL Server. If your Windows account does not have the necessary access rights, the SQL Server SA password will be needed to enable you to log in using SQL Server Authentication. Select Settings>Backup Path from the system menu. This path is the location of the backup files. Put a full set of backup files in this folder. To restore the database backup set, select Perform > Perform Full Restore from the system menu Page 15 of 16 Version 1.2, revised July 2010

Confirm that you wish to perform a full-restore by re-typing the 9-digit code generated. Restoring backups using SQL Server tools Note that, if you are using a full version of SQL Server (rather than MSDE or SQL Server Express) it is also possible to restore databases using the tools provided with SQL Server. If this approach is taken, care should be taken to ensure that all of the People Inc. databases on the server are restored to a backup taken at a particular point in time (this will comprise 4 or more SQL Server databases). Users are likely to experience problems if a single database backup from a set of backups is restored without the remainder of the set of backups. If backups are restored using SQL Server tools, it may be necessary to create/modify SQL logins manually before People Inc. will function correctly. SQL Server version SQL Server backup files can only be restored onto a server running the same (or in some cases a more recent) version of SQL Server as that used to create the back-up files. For example, it is not possible to restore SQL Server 2005/2008 backups onto an SQL Server 2000 installation. Page 16 of 16 Version 1.2, revised July 2010