• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Disclaimer & Policy

Elan Shudnow's Blog

MVP Logo
  • Azure
  • Exchange
  • Lync

DBIMPEXP.exe functionality integrated into Lync 2013 Preview Management Shell

October 9, 2012 by Elan Shudnow 15 Comments

Prior to Lync Server 2013, there was a tool.  And this tool was called DBIMPEXP.exe.  It stands for Database Import Export.  This tool was part of the OCS and Lync 2010 Resource Kits, but will now be deprecated to make way for built-in Lync Management Shell PowerShell commands.  But before we talk about its replacement in detail, let’s talk a little bit about DBIMPEXE.exe’s capabilities. DBIMPEXP.exe was used to back up users contact and conference data.  In fact, part of the official backup instructions were to use the DBIMPEXP.exe to backup user data.

Lync Server 2010 – DBIMPEXP.EXE

Note: I am documenting the commands below for Enterprise Edition of Lync.  For Standard Edition, simply remove /sqlserver.

Backing up and restoring all user data

From the official, “Backing Up Core Data and Settings” Technet article, Microsoft provides the following DBIMPEXP.exe commands to back up user data:

Dbimpexp.exe /hrxmlfile:<path and backup file name> /sqlserver:<SQL Server FQDN>\<instance name>

An example would be:

Dbimpexp.exe /hrxmlfile:D:\BackupUser.xml /sqlserver:sql.contoso.com\rtc

To import data from your backed up .xml file, the following command would import user data:

Dbimpexp.exe /hrxmlfile:<path and file name of backed up Rtc database> /sqlserver:<SQL Server FQDN>\<instance name> /import /restype:all

An example would be:

Dbimpexp.exe /hrxmlfile:D\BackupUsers.xml /sqlserver:sql.contoso.com\rtc /import /restype:all

 Backing up and restoring specific user’s data

There is more control over the usage of Dbimpexp.exe.  With the above commands, you are essentially backing up and restoring the entire rtc database for all user contact and conference information.  If we wanted to backup a specific  user’s contact/conference information, we can run the following command:

dbimpexp.exe /hrxmlfile:contacts.xml /user:<sip URL> /sqlserver:sqlservername

To import that specific user’s data from their backed up .xml file, the following command would import that user’s data.

dbimpexp.exe /import /hrxmlfile:contacts.xml /user:<sip URL> /sqlserver:SQL_SERVER

Backing up specific data resource types

With the aforementioned commands, all have a /restype set to all.  This means both contact list and conference directory information is exported.  There is a way to backup either the user or conference data without exporting both.  To export only the user contact list data, the following restype would be specified:

/restype:user

To export only the conference data, the following restype would be specified

/restype:confdir

When using /restype:confdir, you can also specific a specific conference directory by using the /dirid switch as follows:

/dirid:1001

 

 Lync Server 2013 Preview – *-CSUserData

Lync Server 2013 Preview has deprecated the use of DBIMPEXP.exe.  There are now native Lync Mangement Server cmdlets to provide the equivalent.  These three commands are:

  • Export-CSUserData – Exports User Data to a ZIP File
  • Import-CSUserData – Imports User Data from a ZIP File.  This does require a restart of the Front End Service (RTCSRV) to allow the data from the SQL blob store to the RTC Database.  This is a fast process to import data and is geared more towards bulk import operations.
  • Update-CSUserData – Updates User data from a ZIP File  This does NOT require a reboot of the Front End Service (RTCSRV)  but is an expensive and slow process and therefore, should only be run in one-off user scenarios rather than bulk import operations.
  • Convert-CSUserData – Converts between a 2010 XML file provided from DBIMPEXP.exe and a ZIP file provided from Export-CSUserData

Note: For this article, I will be showing the new Export-CSUserData and Import-CSUserData commands.  In a future article for Lync Server 2013 RTM, I will provide more information on the remaining commands.

Export-CSUserData

This is the direct replacement for dbimpexp.exe /export.

The command I will be running against my test Lync Server 2013 Preview Pool is as follows:

Export-CsUserData -PoolFQDN “lync15pool.15lab.net” -FileName “C:\Logs\ExportedUserData.zip”

After exporting the data, we see that we now have a ZIP file.

And within that ZIP, we get a couple XMLfiles.  The meat of the data is stored in DocItemSet.xml.

Just as with DBIMPEXP.exe, we can filter on specific users and conference directories for export.

To filter for a specific user, we would run the following command:

Export-CsUserData -PoolFQDN “Pool FQDN” -UserFilter “[email protected]” -FileName “<path and backup file name>”

To filter for a specific Conference Directory, we would run the following command:

Export-CsUserData -PoolFQDN “Pool FQDN” -ConfDirectoryFilter 13 -FileName “<path and backup file name>”

Import-CSUserData

This is the direct replacement for dbimpexp.exe /import.  It imports data from the ZIP file previously exported from Export-CSUserData.  Then the user data will be replicated with Active Directory automatically at regular time via Lync user replicator service

I will be importing the data I ran previously from Export-CSUserData. The command I will be running against my test Lync Server 2013 Preview Pool is as follows:

Import-CsUserData -PoolFQDN “lync15pool.15lab.net” -FileName “C:\Logs\ExportedUserData.zip”

After importing the data, we see need to restart the Front End Service, RTCSRV, on all Front End Servers in the pool so that the restored data will propagate from the SQL blob store.

This can easily be achieved by running the following commands:

Stop-CSWindowsService -Name RTCSRV

After all Lync Server 2013 Preview services have been stopped, the following command will start all the Lync Server 2013 Preview services.

Start-CSWindowsService

Just as with DBIMPEXP.exe, we can filter on specific users and conference directories to import.

To filter for a specific user, we would run the following command:

Import-CsUserData -PoolFQDN “Pool FQDN” -UserFilter “[email protected]” -FileName “<path and backup file name>”

To filter for a specific Conference Directory, we would run the following command:

Import-CsUserData -PoolFQDN “Pool FQDN” -ConfDirectoryFilter 13 -FileName “<path and backup file name>”

Share this:

  • Share on X (Opens in new window) X
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Reddit (Opens in new window) Reddit

Filed Under: Lync Tagged With: Lync

Reader Interactions

Comments

  1. Lior Efraim says

    December 31, 2013 at 7:41 am

    did i can import user data to all other users data, for populating Lync contact list?

    Reply
  2. Andrew says

    September 17, 2013 at 3:27 pm

    Octavio Hope it isn't too late, try the ExppHomedResourceXml SP in the RTC database

    Reply
  3. Octavio says

    July 8, 2013 at 8:58 pm

    I want to extract lost contacts for a certain user from a SQL backup (from a date where the contacts existed — about a month ago). I do not want to restore over our current good SQL. I just want to extract these contacts into XML and then use the Lync shell to reimport for the specific user in question. The shell appears that it can only work to import and export from the production SQL DB. Can you help me out? I've looked everywhere for what I thought would be a common task. Not sure if other admins have come across this issue in Lync 2013 yet.

    Reply
  4. shenoy says

    May 28, 2013 at 1:50 am

    Hi.. Thanks for the nice post. Just have this question, what does "SQL blob store" refers to?

    Reply
    • Elan Shudnow says

      May 28, 2013 at 8:56 am

      It just means that the instance is used for lazy writes from the Front End Server and then used for rehydrating other servers in the pool with user data.

      Reply
      • shenoy says

        May 28, 2013 at 9:32 pm

        Thanks. Do you have a blog on Lync 2013 DB Architecture, BE DBs and FE DBs,? I could not find any good reference.

        Reply
        • Elan Shudnow says

          June 6, 2013 at 9:36 pm

          This is probably the closest that exists: http://terenceluk.blogspot.com/2012/12/microsoft-…

          Reply
  5. joki says

    April 10, 2013 at 1:39 pm

    Hi how i backup in lync 2010 Response Group and the Conferencing Attendant configuration

    Reply
  6. rafavekia says

    March 7, 2013 at 5:32 am

    Hi Elan, very nice post!
    I did write a post about How export contacts in OCS/Lync2010 and import in Lync 2013!
    http://uclavecchia.wordpress.com/2013/03/06/expor…

    Reply
  7. Turbomcp says

    October 27, 2012 at 4:49 pm

    Thanks alot
    valuable info for my next month lync 2013 exams

    Reply
  8. Hanila says

    October 22, 2012 at 8:00 pm

    I like the valuable info you provide in your articles. Ill bookmark your weblog and check again here regularly. Im quite sure Ill learn many new stuff right here! Good luck for the next !http://journalpsyche.org/

    Reply
  9. Hanila says

    October 22, 2012 at 7:59 pm

    I like the valuable info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I’m quite sure I’ll learn many new stuff right here! Good luck for the next !http://journalpsyche.org/

    Reply
  10. Anil Singh says

    October 14, 2012 at 12:01 am

    Nice post, I just came to know lync 2013 preview has this new extension :)

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

  • GitHub
  • LinkedIn
  • RSS
  • YouTube

More to See

Azure AD User Settings

Pre-creating Azure AD App for Azure Migrate

January 24, 2023 By Elan Shudnow

Azure Runbooks Connecting to Exchange Online and Microsoft Graph

July 22, 2022 By Elan Shudnow

Using Python 3.8.0 Azure Runbooks with Python Packages

July 11, 2022 By Elan Shudnow

Preserving UNC Path after Azure Files Migration using DFS-N

April 10, 2022 By Elan Shudnow

Tags

ACR Always Encrypted Ansible Automation Availability Sets Availability Zones Azure Azure Active Directory Azure Application Gateway Azure Files Azure Firewall Azure Key Vault Azure Load Balancer Azure Migrate Azure Monitor Azure Web App CDN Cluster DevOps DFS Docker DPM Event Grid Exchange Exchange 2010 Exchange Online Function App ISA iSCSI Log Analytics Logic App Lync Microsoft Graph OCS Office Personal PowerShell Proximity Placement Groups Runbook SCOM Storage Accounts Symantec Virtual Machines Windows Server 2008 Windows Server 2008 R2

Footer

About Me

Microsoft Cloud Solution Architect focused on Azure IaaS, PaaS, DevOps, Ansible, Terraform, ARM and PowerShell.

Previously a 6x Microsoft MVP in Exchange Server and Lync Server.

My hobbies include watching sports (Baseball, Football and Hockey) as well as Aviation.

Recent

  • GRS Storage and BCDR Considerations
  • Pre-creating Azure AD App for Azure Migrate
  • Azure Runbooks Connecting to Exchange Online and Microsoft Graph
  • Using Python 3.8.0 Azure Runbooks with Python Packages
  • Preserving UNC Path after Azure Files Migration using DFS-N

Search

Tags

ACR Always Encrypted Ansible Automation Availability Sets Availability Zones Azure Azure Active Directory Azure Application Gateway Azure Files Azure Firewall Azure Key Vault Azure Load Balancer Azure Migrate Azure Monitor Azure Web App CDN Cluster DevOps DFS Docker DPM Event Grid Exchange Exchange 2010 Exchange Online Function App ISA iSCSI Log Analytics Logic App Lync Microsoft Graph OCS Office Personal PowerShell Proximity Placement Groups Runbook SCOM Storage Accounts Symantec Virtual Machines Windows Server 2008 Windows Server 2008 R2

Copyright © 2026 · Magazine Pro on Genesis Framework · WordPress · Log in