how to backup and restore your xenapp database

Upload: daniel-valderrama

Post on 10-Jan-2016

12 views

Category:

Documents


0 download

DESCRIPTION

How to Backup and Restore Your XenApp Database

TRANSCRIPT

How to Backup and Restore your XenApp/XenDesktop DatabaseObjectiveThis article describes how to back up and restore a XenDesktop database on Microsoft SQL Server.RequirementsThis article assumes you are an SQL administrator with basic knowledge of SQL Server or appropriate resources to assist with the execution of the SQL statement command.BackgroundWhen using Microsoft SQL Server, consult the Database Server product documentation for scheduling automated backups of the data store. In most cases, daily backup is sufficient to prevent loss of farm data.InstructionsBackupThe following process describes how to perform a one-time, manual backup. It does not prevent the need to perform scheduled backups of the database. This backup captures a snapshot of the database at that time it is performed. It is recommended that no administrative changes be performed while the backup is in progress.Complete the following procedure:

1. Verify the name of the database and database server that is currently used by starting PowerShell from the Desktop Studio Console.

0. Run the following command: Get-BrokerDBConnection to get the name of the database server/Data Source and the Database/Initial Catalog name.Example 1PS C:\> Get-BrokerDBConnectionServer= sqlserver.training.local;Database= CitrixXenDesktopDB ;Trusted_Connection=True"Example 2PS C:\> Get-BrokerDBConnectionData Source=SQLServer; Failover Partner=SQLServer2; Initial Catalog=CitrixXenDesktopDB; Integrated Security=True; Network=dbmssocn0. Connect to the SQL server and open the Microsoft SQL Server Management Studio.1. Connect to the Database Engine.

0. Expand the Databases node for your server and navigate to the database identified in Step 2.

0. Right-click database,select Tasks > Back Up.

0. Verify that the backup type is set to Full and verify the information listed. There is an option you can leverage to verify the backup when finished.

0. Cick OK and ensure that the backup completed successfully.

SeeCreating Full and Differential Backups of a SQL Server Database.RestoreImportant Remove any hotfixesapplied after the backup before performing the restore. As a precaution, back up the present database before the restore.The following process describes how to perform a restore from the backup done in the previous section. This process returns the database to the point in time when the backup was performed. Any changes made after that point in time will be lost.Complete the following procedure:1. Connect to the Database Engine.

0. Expand the Databases node for your server and navigate to the name of your XenDesktop database.

0. Right-clickdatabase,select Tasks >Restore >Database.

0. Select the backup set that you want to restore from the list or go to the next step on how to select a file.

The source can be changed to From device then select the browse icon

0. Select Add to locate the backup file from its folder.

0. Ensure the correct backup set is selected then click Options.

0. From Options , click Overwrite the existing database and Restore with recovery.

0. Click OK.

0. Restart Each Broker.1. From each broker, open a PowerShell prompt and run the following commands to verify the status of each service:Add-PSSnapin Citrix.*Get-AcctServiceStatusGet-BrokerServiceStatusGet-ConfigServiceStatusGet-HypServiceStatusGet-LicServiceStatusGet-ProvServiceStatusGet-PvsVmServiceStatusNote: Verify that all precedingcommandshave returned a result of OK. If a result other than OK is returned for any of these commands, it might be necessary to enable logging or tracing to determine the cause of the connection failure.0. Use the XDDBDiag utility - CTX128075 -XDDBDiag for XenDesktopto verify the consistency of the database after the restore. If any Virtual Desktop Agents were running when the DDC services were shut down in Step 1, it could take up to 10 minutes before the Virtual Desktop Agents reregister. No other action is required.1. Readto the Desktop groups all changes including catalogs, hosts, or assignments made after the backup date.Applicable Products XenDesktop XenApp 7.5