Persistent Chat database

The Persistent Chat Server role is optional, and not all deployments include this role. If the role is not implemented, there is really nothing to worry about here.

In the event that the Persistent Chat Server role is deployed, it could be on a separate pool and have a different set of databases than the rest of the Lync deployment. This will vary between the Standard Edition (collocated) and Enterprise Edition deployments. The backup and restore is done with their own set of backup commands and must be performed using PowerShell.

The Persistent Chat database and information is not included in the Export-CsConfiguration or Get-CsTopology command (except for the name of the pools, database, and core information).

Tip

Run the following PowerShell command to verify that the Persistent Chat is deployed:

Get-CsService –PersistentChatDatabase

Getting ready

This task can only be performed in PowerShell and must be done in the elevated administrative mode.

To get a list of the servers and instances in use by the deployment, run this:

Get-CsService -PersistentChatDatabase | Select-Object poolfqdn, sqlinstancename | fl 

How to do it…

The Export-CsPersistentChatData and Import-CsPersistentChatData commands are primarily for migration purposes, but why not use them as an extra backup?

The following are the three steps to back up the Persistent Chat databases:

  1. Start PowerShell in the elevated administrative mode.
  2. For each server returned by the get command, run this:
    Export-CsPersistentChatData –DBInstance´ sql_srv.mydomain.commypreschatinst –FileName´ "c:ackupPersistantChatDBx.zip
    
  3. Store those files in a secure location.

    Tip

    Name the export ZIP files in a such a way that you can recognize where they belong when a restore is in need.

    Note

    If the deployment is configured with pool pairing, only the master database is required for backup. To verify this, run the following command: 

    get-csdatabasemirrorstate -poolfqdn mychatpool.mydomain.com -databasetype persistentchat

The following are the two steps to restore data:

  1. Start PowerShell in the elevated mode.
  2. For each server in the deployment where a restore is needed, run the following command:
    Import-CsPersistentChatData –DBInstance´ sql_srv.mydomain.commypreschatinst –FileName´ "c:ackupPersistantChatDBx.zip"
    

    Note

    The topology must be deployed with servers, database servers, and instances, before this task can begin.

There's more…

The Export-CsPersistentChatData command can be used to make a more granular export/backup. There are a couple of switches to control the output. These can be very useful to control the amount of data exported. The switches are as follows:

  • - Level: This is used to control what type of data we export. The values that are allowed are All (default), User, Category, RoomDirectory, and Content.
  • - Scope: This is used to control what category to export.
  • - Startdate: This is used to control how much old data to export. Not all data from the beginning of time is relevant when doing backups. This switch can only be used when Level is set to RoomDirectory.

    Note

    Running the Export-CsPersistentChatData command without specifying any of these additional switches will create a backup from the beginning of time. If this is undesirable, the export job should be split into several jobs using the Level switch. However, in a large deployment, this can easily get very complex and hard to control. Keep it as simple as possible.

See also

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

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