WHITEPAPER BackupAssist Versin 6 www.backupassist.cm
2 Cntents 1. Requirements... 3 1.1 Remte SQL backup requirements:... 3 2. Intrductin... 4 3. SQL backups within BackupAssist... 5 3.1 Backing up system databases:... 5 3.2 Backing up user databases:... 6 4. Transactinal Lgs Backups... 6 4.1 Operatins Supprted by the Transactin Lg... 7 5. Cnfiguring SQL database backups... 7 6. Restring Databases... 8 6.1 Accessing the SQL Restre Utility... 8 6.2 Master database recvery... 9 7. Restring selected SQL databases... 11 7.1 T restre ne r mre databases:... 11 References... 13
3 1. Requirements 1. BackupAssist v6 2. Windws 2000, XP, 2003, Vista, 7, r 2008/ R2 3. Micrsft SQL Server 2000, 2005, 2005, r 2008/R2 (including all variants: SQL Express, MSDE, etc) Nte: t backup MSDE databases, BackupAssist shuld be installed n the actual machine running MSDE. 1.1 Remte SQL backup requirements: T back up a remte SQL database yu need t make sure that the SQL server accepts remte TCP/IP cnnectins. T d this: 1. G t Start > All Prgrams > SQL Server > SQL Server Cnfiguratin Manager. 2. Enable TPC/IP and Named Pipes fr bth Client prtcls and Prtcls fr MSSQLSERVER: 3. Yu will then need t enable remte cnnectins n yur SQL Server. This setting can be fund in yur SQL Server s Enterprise Manager, under the prperties f the server. Yu need t enable the Allw
4 remte cnnectins t this server fund under Cnnectins. After cmpleting these steps yur SQL Server is ready t receive remte cnnectins frm BackupAssist. 2. Intrductin BackupAssist includes a specific backup engine that is specifically designed t allw users t backup / restre their SQL databases. Using the SQL engine, BackupAssist can perfrm live, nline backups f yur SQL Server databases and include these backups in yur verall backup jb (tgether with yur files, system state, etc). SQL Server backups are stred in the standard SQL Server Backup Frmat (.bak file frmat), which allws yu t perfrm a restratin f yur entire SQL Server n any machine, withut needing any additinal sftware. The SQL engine als allws users t restre their databases t a different SQL server. Key features f the BackupAssist SQL Server Add-n: Backup bth lcal and remte SQL Server databases "Live snapsht" f yur databases, which means the SQL Server des nt need t be taken ffline during the back up. Easily schedule Transactin-lg backups f SQL databases fr near-cntinuus data prtectin and pint-in-time restre. Restre an entire SQL server r individual databases using the built-in SQL Restre utility.
5 3. Hw the SQL Add-n wrks BackupAssist will lgin t yur SQL server and perfrm a backup f the databases in.bak file frmat. These SQL backup files are then transferred t yur backup device (tape, hard drive, netwrk server, etc). 3.1 Backing up system databases SQL system databases need t be backed up in additin t custm user databases, fr yu t be able t rebuild the entire SQL Server in the event f system r database failure. The system databases vary depending n the versin f SQL yu are running, but generally include the fllwing: Master Recrds all the system-level infrmatin fr an SQL Server instance. The master database is cmpsed f imprtant system tables and catalgs and is critical t yur SQL server. If yu are restring yur SQL server after a disaster r new installatin, it is advised that yu restre the master database befre restring any ther database. The BackupAssist SQL Restre utility can be used t restre all ther databases remtely but nt the master database. If yu need t restre the master database t a remte SQL server yu shuld install BackupAssist n the server running SQL. Nte: yu can nly perfrm full backups f the master database. Transactinal lg, differential r filegrup backups f the master database are nt allwed. Msdb Used by the SQL server agent fr scheduling alerts and jbs. The msdb database is used t stre data, including scheduled jb infrmatin, backup and restre histry infrmatin and DTS packages (data transmissin services). Usually the msdb database is rather small, and therefre full database backups prvide a fast alternative t transactin lg backups fr this database. Mdel The mdel database is a template, used by Micrsft SQL Server when creating ther databases, such as tempdb r user databases. When a new database is created, the entire cntents f the mdel database is cpied t the new database. If the master r msdb databases are rebuilt, the mdel database is als rebuilt and therefre changes are lst. Resurce Is a read-nly database that cntains system bjects included with SQL server 2005. The Resurce database makes upgrading t a new versin f SQL Server an easier and faster prcedure. In earlier versins f SQL Server, upgrading required drpping and creating system
6 bjects. Because the Resurce database file cntains all system bjects, an upgrade is nw accmplished by cpying the single Resurce database file t the lcal server. Similarly, rlling back system bject changes in a service pack nly requires verwriting the current versin f the Resurce database with the lder versin. Tempdb Is a wrkspace fr hlding temprary bjects r intermediate results sets. It is imprtant t have regular backups f these system databases, hwever, it is nt necessary t back up the tempdb system database because it is rebuilt each time SQL Server is started. When SQL Server is shut dwn, any data in tempdb is deleted permanently. Fr this reasn, d nt stre any applicatin specific data in the tempdb database. Leave it exclusively fr use by SQL Server. 3.2 Backing up user databases User databases shuld be backed up n a regular basis. Frm the abve example, yu can see user databases like Accunts, BackupAssist, Purchasing, and s n. 4. Transactin Lg backups Transactin-lg Backups f SQL server databases are nly pssible if the databases are cnfigured using the Full r Bulk Lgged recvery mdels ptin. Fr additinal in-depth infrmatin n SQL database recvery mdels, please refer t http://msdn.micrsft.cm/en-us/library/ms175477.aspx. SQL server utilizes a transactin lg t track all f the mdificatins perfrmed within a database. This lg ensures bth that the database is able t recver when abruptly interrupted (such as a lss f pwer) and that users are able t und (r 'rllback') the results f a database transactin if required. Each time the transactin lg is backed up, SQL Server remves all f the cmmitted transactins in the lg and writes them t the backup media. Due t this incremental prcess, transactin lgs are nt cumulative and yu must maintain a cmplete set f transactin lgs reaching back t the mst recent full r differential backup.
7 Every SQL Server database has a transactin lg that recrds all transactins and the database mdificatins made by each transactin. The transactin lg is a critical cmpnent f the database and, if there is a system failure, the transactin lg might be required t restre yur databases t a cnsistent state. 4.1 Restre peratins supprted by the Transactin Lg The transactin lg supprts the fllwing peratins: Recvery f individual transactins. Recvery f all incmplete transactins when SQL Server is started. Rlling a restred database, file, file grup, r page frward t the pint f failure. Fr mre infrmatin please refer t http://msdn.micrsft.cm/en-us/library/ms190925.aspx 5. Cnfiguring SQL database backups in BackupAssist The is required t perfrm backups f SQL databases. With the add-n yu can perfrm FULL backups r Transactinal backups f yur SQL databases. SQL backups cnfigured within an NTBackup Methd jb will nly be full backups. T perfrm transactin lg backups f yur SQL databases, yu need t create an SQL Methd backup jb, described as fllws: 1. G t File > Create new backup jb in BackupAssist. 2. Select SQL as yur backup methd. 3. During the scheduling step yu can chse either Basic (fr full backups nly) r Transactinal fr Full and Transactin Lg backups. 4. During the destinatin step yu can specify the directry where yu want t stre yur SQL backup files.
8 The database backup wrks by lgging int the SQL server and perfrming a database backup t file (in the.back file frmat). 5. During the Files and Flders step can add the SQL server frm which yu want t backup databases Nte: yu can use either the IP address r the SQL server name. Nte: nce the jb has been created yu can access the SQL server tab f the jb t add additinal SQL Servers t backup. 6. The wizard will then guide yu thrugh rest f the steps t create yur SQL backup jb. 6. Restring SQL databases BackupAssist prvides an inbuilt SQL Restre Utility that can be used t restre SQL databases t bth lcal and remte SQL Servers. In additin, yu can restre databases t a specific pint in time prvided that yu have a transactin lg backup f the relevant databases. While yu d need t have BackupAssist installed t use the restre utility, it des nt have t be a licensed installatin f the sftware. Yu can simply run SQLRestre.exe frm the BackupAssist installatin directry. 6.1 Running the SQL Restre Utility 1. Click Restre in the navigatin bar. 2. Click SQL restre. Alternatively, run SQLRestre.exe frm the directry where BackupAssist was installed. 3. The SQL Restre Utility will launch and attempt t detect fr bth lcal and remte SQL servers that can be restred t. Lcal server: select the lcal server yu wish t restre t frm the list f detected servers. Nte: If the SQL server yu wish t restre t is nt running r 'stpped', click Attempt t start. Any servers that cannt be started may indicate a fault with the server itself. Yu can nly restre t SQL servers that are running. Cnsult yur system administratr if any SQL servers will nt start. Remte server: select the Restre a remte server radi buttn and chse a server frm the drp-dwn list.
9 Nte: if the remte server yu want t restre t is nt in the list r n remte servers were detected yu can type the server's name r IP address directly int the field. 4. Click next and BackupAssist will attempt t cnnect t the SQL server using the BackupAssist user identity credentials. Nte: if BackupAssist is unable t authenticate t the server yu will be asked t input a valid username and passwrd. If the SQL server yu are restring t nly accepts SQL authenticatin r requires a different Windws user uncheck Use the BackupAssist user identity and input a valid username and passwrd. 5. Select a restre type. Nte: multiple restre types can be selected. The master database is restred first befre selected databases. 6.2 Master database recvery BackupAssist prvides a utility fr restring the master database t a lcal SQL server in just a few simple steps. The master database is cmpsed f imprtant system tables and catalgs and is critical t yur SQL server. If yu are restring yur SQL server after a disaster r new installatin, it is advised that yu restre the master database befre restring any ther database. The restre utility can be used t restre all ther databases remtely but nt the master database. If yu need t restre the master database t a remte SQL server yu shuld install BackupAssist n the remte server itself. The installatin des nt need t be licensed t use the utility and yu can even run SQLRestre.exe frm the BackupAssist installatin directry if the trial has expired. T restre the master database: 1. Click Restre in the navigatin bar. 2. Click SQL restre Alternatively, yu can run SQLRestre.exe frm the directry where BackupAssist was installed. 3. Chse the SQL server instance yu wish t restre t frm the list f lcal servers detected. 4. Check Master database recvery Nte: if yu want t restre additinal databases as well as the master check Selected databases as well. The master database will be restred befre all ther databases.
10 5. Specify the path where the master database backup file resides (in.bak frmat) either by typing it directly in the Add directries cntaining backups field r by brwsing fr it. 6. Click Add if the path was entered manually. Yu can add as many directries as yu like. BackupAssist will search each directry added and determine which master database backups are available t restre frm in date rder. 7. Select the master database backup yu want t restre frm the list at the bttm f the windw and click Next. 8. Click Start restre t the right f the windw t restre the master database frm the backup specified in the previus step. A list f steps is displayed that indicate the status f the restratin prcess. As the SQL service is stpped during the restre yu shuld nly perfrm this peratin n an SQL Server that is nt being accessed.
11 9. Once the master database restre is cmplete the list f databases at the bttm f the windw is updated and shuld indicate that all databases are nline. The SQL server can nw cntinue with nrmal peratins. 10. If any databases are listed as nt being nline (suspect r crrupt), r if yu simply want t restre additinal databases check Restre ther databases fr this server next at the bttm f the windw; therwise, click Finish. 7. Restring selected SQL databases BackupAssist prvides a utility fr restring ne r mre SQL databases t either a lcal r remte SQL server in just a few simple steps. The utility als lets yu restre a SQL database t a specific pint in time, prvided yu have a transactin lg backup t restre frm. The databases yu wish t restre must already exist n the SQL server; if they d nt yu can either chse t use the SQL Restre Utility t restre the master database first, which will result in recreating all databases n the server, r yu can manually recreate each database yu wish t restre. If yu are restring yur SQL server after a disaster r new installatin, it is advised that yu restre the master database befre restring any ther database. 7.1 Restring ne r mre databases: 1. Click Restre in the navigatin bar. 2. Click SQL restre. 3. Chse the SQL server instance yu wish t restre t frm either the list f lcal r remte servers detected. 4. Check Selected databases Nte: checking this ptin will nt let yu restre the master database. if yu want t restre the master database check Master database recvery as well. The master database will be restred befre ther databases 5. Specify the path where the database backup files reside (in.bak frmat) either by typing it directly in the Add directries cntaining backup s field r by brwsing fr it. Nte: this is typically the SQL directry used in yur BackupAssist backup jb. Each database backup created is stred in the SQL directry in.bak frmat (a separate file fr each database) befre being cpied t the backup destinatin (tape drive, external hdd, REV drive, etc). If the backup files fr yur databases are nt available yu may need t first restre them frm yur backup media using NTBackup.
12 6. Click Add if the path was entered manually. Yu can add as many directries as yu like. BackupAssist will search each directry added and determine if there are database backups that can be restred frm. 7. Click Next and yu will be presented with a list f databases that can be restred using the SQL backup files specified in the previus step. The list may take time t generate depending n the number f backup files. 8. Check each database in the list that yu wish t restre. T restre all databases t the same pint in time, specify the time in the Restre time drp-dwn menu and click Search. If the restre time specified is nt available frm the supplied backup files, a warning icn will appear t the right f the database and the nearest available time t that specified that the database can be restred t will be indicated. If the restre time selected is available, a success icn will appear t the right f the database. 9. If yu wish t specify a different restre time fr each database individually, click Set restre time t the right f the apprpriate database:
13 1) The available dates that the database can be restred t appear in bld n the calendar. Select ne f these dates frm the calendar. 2) A list f time ranges will appear in the Select a time range bx. Yu can restre the database t any pint in time between any f the time ranges listed. 3) Select a time range frm the list and input a specific pint in time t restre the database t in the Select a time frm within that range field. 10. Once yu have set the restre times fr all databases yu wish t restre click Next. 11. Click Start restre t the right f the windw t restre all databases selected. Click Next nce the restre prcess cmpletes. 12. Future transactin lg backups cannt be used t restre a database t a specific pint in time until a full backup runs s it is recmmended that yu nw run a full backup f the databases that were restred. Click Start full backup. Full backups f these databases will be stred in the same flder as the backup files yu just restred frm. If yur backup schedule already includes a full backup as the next SQL backup and yu are certain yu will nt need t restre these databases t a specific pint in time between the restratin and the next full backup yu can check Skip full backup and click Finish. References Fr additinal infrmatin regarding recvering yur SQL databases t a certain pint in time and creatin f multiple recvery pints, please refer the fllwing article n the Micrsft Knwledge base: http://msdn.micrsft.cm/en-us/library/ms175078.aspx. Tips fr scheduling and testing SQL server backups: http://searchsqlserver.techtarget.cm/tip/0,289483,sid87_gci1307822,00.html?asrc=ss_cla_301326&psrc =CLT_87 SQL system databases explanatins: http://vyaskn.tripd.cm/sql_server_administratin_best_practices.htm MSDN knwledge base n recvery paths: http://msdn.micrsft.cm/en-us/library/ms175078.aspx