locked
Back up & Restore Tenants in a Multi Tenant SharePoint 2013 environment RRS feed

  • Question

  • I have a SharePoint 2013 environment with Multi-Tenancy configured. I have various tenants provisioned in the environment. Is it possible to backup and restore a tenant from one environment to another. If so, please provide the steps.

    PS: I know we can backup a single site collection using PowerShell, but a tenant normally has a group of site collections grouped with a subscription. Hence I am raising this. Also, I know there is a Content DB backup approach. But what about the other aspects, which are required to be kept in mind while doing this, like Service Applications, Permissions, Users, Custom Code, SharePoint version and so on. Please provide your inputs.


    Ven

    Monday, January 18, 2016 5:40 AM

All replies

  • I have a SharePoint 2013 environment with Multi-Tenancy configured. I have various tenants provisioned in the environment. Is it possible to backup and restore a tenant from one environment to another. If so, please provide the steps.

    PS: I know we can backup a single site collection using PowerShell, but a tenant normally has a group of site collections grouped with a subscription. Hence I am raising this. Also, I know there is a Content DB backup approach. But what about the other aspects, which are required to be kept in mind while doing this, like Service Applications, Permissions, Users, Custom Code, SharePoint version and so on. Please provide your inputs.


    Ven


    Monday, January 18, 2016 5:55 AM
  • Hope the below given informative resources helps you to get in more detailed:
    Understanding multi-tenancy in SharePoint Server 2013:
    https://technet.microsoft.com/en-us/library/dn659286.aspx

    Limitations on SharePoint Server backups and restores

    Restoring SharePoint Multi-Tenant Environment from SQL Backup

    SharePoint 2013 - Migrate from a non Multi tenant environment to Multi tenant environment


    Easily migrate anything from Office 365, File Servers, Public Folders, OneDrive and SharePoint to SharePoint Online easily with Lepide SharePoint Migrator.

    Monday, January 18, 2016 7:46 AM
  • One of the links above (Restoring SharePoint Multi-Tenant Environment from SQL Backup) doesn't help, since it belongs to Experts-Exchange for which I would need a subscription. The first link is very generic and doesn't go into the details of how to achieve it. The second one seems to be a 3rd party paid product. Hence I am not finding much help from these.

    Ven

    Tuesday, January 19, 2016 6:14 AM
  • Can anyone please help? Looks like this would also involve backing up of Managed Metadata Service (or any other services) in Partitioned mode. Has anyone backed up and restored a tenant yet in On Premise environment? I was trying using individual site collection back up and restore of a tenant, but it breaks the managed metadata associations. Also, I am not sure, how the users will work.

    Ven


    • Edited by Venh Friday, January 29, 2016 11:19 AM
    Friday, January 29, 2016 9:18 AM
  • Backup and restore process is indeed not an easy and handy way when it comes to SharePoint multitenant environments. you can use the below commands to backup all sites tied up with the single subscription ID but the restore is not that easy since you are not moving subscription db etc.. so best choice is to move content database and re-generate subscriptions IDs in target farm for the site collection.

    anyhow the below script will create a subfolder within the target backup directory and take a backup of all multitenant sites (main and member)

    $url = "https://wf1.sharepoint.com"
    $mtsite = Get-SPSite $url
    $loc = "C:\SP-backup\"
    foreach ($sub in $mtsite.SiteSubscription)
    {
    Write-Host Exporting site subscription $sub.Id
    $fl = $loc + $sub.Id
    if(!(test-path $fl -pathtype container))
    {
    New-Item -Path $fl -ItemType directory
    }
    $exportPath = $fl + "\SiteSubscriptionSettings.bak"
    Export-SPSiteSubscriptionSettings $sub -Path $exportPath -Force
    
    foreach ($site in $sub.Sites)
    {
    Write-Host Exporting site $site.Id
    $backupPath = $fl + "\" + $site.Id + ".bak"
    Backup-SPSite $site -Path $backupPath -Force
    
    }
    }
    I do appreciate if anyone can give a workable script for restore process.

    So far, we only have a content DB move option ;)

    the below steps can be used to move multi-tenant sites across SP Farms.

    1. Create a Temp Content DB on your source SP server
    2. move the required site collections to that db
    3. backup content DB using SQL management studio and restore on target SQL server where site needs to be moved.
    4. Mount DB using the following command :
      Mount-SPContentDatabase -Name databasename -DatabaseServer databaseserver -WebApplication http://webappname
    5. once done you will be able to view sites in target SP server but no subscription IDs yet
    6. Create new Site Subscription in the new farm and tie with the Site just restored
    7. do this for all member sites
    8. now check the feature pack which was attached in old SP farm with this site collection and bind the site accordingly in new farm using this command :

    $FeaturePack = "feature-pack-ID"

    $subscription = New-SPSiteSubscription Set-SPSite -Identity <site-collection-url> -SiteSubscription

    $subscription -Confirm:$false




    ja

    Monday, February 1, 2016 12:35 PM
  • Hi Ja,

    Thanks for your response. I tried restoring the DB (backed up from source Tenant) and mounted the DB in the target environment through the Central Admin site itself. However, after doing this, when I was trying to open the site collections in the target (from the restored tenant), I keep getting the Login prompt. On a different occasion and on a different environment, I tried the DB mounting approach, it let me in after mounting, but there was no restored content. So, I am a little confused. Also, your PowerShell script to associate new subscription didn't work. Can you please check and let me know, if it is correct or missing something.

    Also, if you can export site subscription settings, can't we also import? Please help.


    Ven


    • Edited by Venh Wednesday, February 3, 2016 5:51 AM
    Tuesday, February 2, 2016 1:25 PM
  • the steps I mentioned earlier are very clear and indeed working. if you are moving your sites / content db to a different AD domain (cross forest migration) then you have to run the below statement to pass through a successful login.

    $sites = Get-SPContentDatabase Databasename | Get-SPSite -Limit ALL foreach ($site in $sites) { foreach ($user in $site.RootWeb.AllUsers) { $newuser = $user -replace "DOMAIN","i:0#.w|DOMAIN" Move-SPUser -IgnoreSID $user -newalias $newuser -Confirm:$false } }

    secondly, import subscription settings will only work with in the same SP farm.


    ja


    Wednesday, February 3, 2016 5:33 AM