Backing Up Lync Server Databases

,

The good news is there is nothing unique about the Lync Server databases stored in SQL Server. They can be backed up and restored like any other database. Although this section does not cover the SQL database process in depth, it summarizes the process for CS administrators who might not be familiar with the process.


Note

Keep in mind that each pool has a unique database and must be backed up separately.


As in previous versions, data is stored in the RTC database. Backups can be done in the SQL Management Studio GUI, scripted using TSQL, or by using a SQL-specific backup agent such as Microsoft Data Protection Manager 2010. Because there are many different enterprise backup products, this section reviews the first two options. Users with an enterprise backup platform should follow the instrutions for SQL backup from their platform vendors.

Backing Up the RTC Database

For a given front end pool, the only database that needs to be backed up is the RTC database. If you choose to deploy Monitoring or Archiving services, those databases need to be backed up in the same manner. To back up the RTC database using the SQL Management Studio GUI, first log in to your SQL server and follow the steps that follow:

1. Open the SQL Management Studio tool and connect to the appropriate SQL instance where the RTC database is stored.

2. Expand Databases and find the RTC database.

3. Right-click the RTC database and select Tasks, and then select Back Up.

4. In the window that displays, ensure the RTC database is selected and the backup type is Full. Ensure the appropriate destination is selected, too. A proper configuration of this screen is shown in Figure 14.1.

Figure 14.1 SQL Database Backup General Options

image

5. In the left column, select the Options item. Most of the items can be left at their default settings; however, it is recommended you enable the Verify backup when finished box, as shown in Figure 14.2. Because the RTC database is not very large, this process does not require much additional time.

Figure 14.2 SQL Database Backup Other Options

image

6. Click OK to begin the backup.

7. A pop-up should display with the message, “The backup of database “rtc’ completed successfully.” Click OK to continue.

Create TSQL Script to Back Up the RTC Database

There are two ways to create the TSQL script for backing up the RTC database. If you are familiar with TSQL, it’s simple to write the script and set it as a job.


Tip

If you are not familiar with TSQL, there is a way to have the SQL Management studio write the script for you. Follow steps 1–5 in the preceding section. However, instead of clicking OK, click the Script button at the top of the window and choose Script Action to New Query Window as shown in Figure 14.3. Simply run the query to create the backup.

Figure 14.3 Creating a TSQL Script for Database Backup

image


For the process outlined previously, the script is included in the following:

BACKUP DATABASE [rtc] TO DISK = N'C:Program FilesMicrosoft SQL
ServerMSSQL10.MSSQLSERVERMSSQLBackup tc.bak' WITH NOFORMAT, NOINIT, NAME
= N'rtc-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where
database_name=N'rtc' and backup_set_id=(select max(backup_set_id) from
msdb..backupset where database_name=N'rtc' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information
for database ''rtc'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N'C:Program FilesMicrosoft SQL
ServerMSSQL10.MSSQLSERVERMSSQLBackup tc.bak' WITH FILE = @backupSetId,
NOUNLOAD, NOREWIND
GO

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset