Project Server 2013 Migration From One Farm To Another

Introduction

In this article, I will explain how to migrate/move a PWA Instance from one farm to another in Project Server 2013.

Project Server 2013 Migration Prerequisites

Before we get started, you should check the below migration prerequisites in Source Farm and Destination Farm.
  • In Source Farm

    1. Specify the Web Application content databases.
    2. Specify the PWA instance with its ‘Project Web App‘ database.
    3. Take a full database backup for the PWA instance database.
    4. Take a full database backup for the web application content databases.
    5. Backup all the deployed SharePoint solutions (WSP) in your farm if exist.

  • In Destination Farm

    1. Prepare Project Server 2013 farm.
    2. Take a full database backup for the following database to enable the rollback if the migration process failed.

      • ProjectWebApp. (Projects Database).
      • WSS_Content. (The web application Content Database).
      • WSS_Content_PWA. (In case of you are using an independent Content Database for PWA Instance).

Source Farm Prerequisites

Specify the Web Application Content Databases

  • Open SharePoint Management Shell as Administrator.

  • Perform Get-SPContentDatabase cmdlet to get all the content databases of your web application.

    Get-SPContentDatabase -WebApplication http://webApp


In our case, we have two content databases.
  1. WSS_Content.(The Main web application Content Database).
  2. WSS_Content_PWA.(An independent Content Database for PWA Instance).

Specify the PWA Instance with its ‘Project Web App‘ database

  1. Open SharePoint Management Shell as Administrator.
  2. Perform Get-SPProjectWebInstance to get all the information related to your PWA instance.

    Get-SPProjectWebInstance -Url http://PWAInstanceUrl

Take a full database backup for the PWA Instance Database

  • Open SQL Server Management Studio.

  • Connect to the SQL Server instance.
  • Backup 'ProjectWebApp' Database.

    • Right click on Database name > Tasks > Back Up.

    • Ensure that the Backup type is Full > In destination section, Select Disk > Browse the backup path > OK.

    • The Backup should be now completed successfully.

Alternatively, you can use the below T-SQL to take a full database backup,
  1. BACKUP DATABASE WSS_Content_PWA
  2. TO DISK = 'C:\ProjectWebApp.BAK'
  3. GO

Take a full database backup for the web application content databases

  1. Repeat the above backup steps for the below content databases,

    • WSS_Content.
    • WSS_Content_PWA.

  2. Once you have finished, check the backup path to make sure that the required databases backup files have been taken properly.

Backup all the deployed SharePoint Solutions (WSP) in the farm

In case, you have a Custom SharePoint Solutions,


You should perform a bulk backup for these solutions as the following:
  1. Create a ‘WSPSolutions’ folder at any location on your hard disk (in our case, we select C:\\).
  2. Open SharePoint Management Shell as Administrator.
  3. Run the below cmdlets to backup all the deployed WSP solutions in your farm.
    1. $FolderPath = "c:\WSPSolutions"  
    2. foreach($solution in Get - SPSolution)  
    3. {  
    4.     $id = $Solution.SolutionID  
    5.     $title = $Solution.Name  
    6.     $filename = $Solution.SolutionFile.Name  
    7.     $solution.SolutionFile.SaveAs("$FolderPath\$filename")  
    8. }  

Destination Farm Prerequisites

Prepare Project Server 2013 farm

In this article, we will outline the main steps that should be followed to prepare your Project Server destination farm:
  • Install and Configure SharePoint Server 2013 with SP1 Enterprise Edition.
  • Install Project Server 2013 with SP1.
  • Install the latest Cumulative Update that already installed in source farm.
Caution

You should be aware that the destination farm build number must be higher than or equal to the build number of source farm to avoid this error This content database has a schema version which is not supported in this farm

Tip

To determine the build number of source farm Check Find the latest Cumulative Update / Farm Patch Level that has been installed in a SharePoint Farm.

Take a full database backup for the PWA Instance Database

It’s recommended to take a full database backup for the below databases, to enable the rollback in case the migration process failed,
  • ProjectWebApp.
  • WSS_Content.
  • WSS_Content_PWA.

Project Server 2013 Migration Steps

  • In Destination Farm,

    1. Dismount Project Web App Instance.
    2. Dismount PWA Instance Content Database.
    3. Dismount Web Application Content Databases.
    4. Restore the source databases backup.
    5. Mount ‘WSS_Content‘ Content Database. Mount ‘WSS_Content_PWA‘ Content Database.
    6. Mount ‘ProjectWebApp‘ Project Database. Mount the PWA Instance.
    7. Deploy your custom WSP solution if exist.
    8. Change the site collection administrator.
    9. Change PWA Instance Administrator.
    10. Perform a Bulk Update Connected SharePoint sites.
    11. Update Project Server Cube settings.

Dismount Project Web App Instance

  • Open SharePoint Management Shell as Administrator.
  • Dismount the PWA Instance to dissociating the PWA site collection from its Project Web App database.

    Dismount-SPProjectWebInstance -SiteCollection "http://SERVER/pwa"

  • The PWA instance should be now dismounted, to check this,

    • Open Central Administration > Application Management > Click on Mange Service Application.
    • Click on PWA service application, you should note that the PWA instance has been dismounted as shown below.

Dismount PWA Instance Content Database

In case you are using an independent content database for PWA instance you should dismount it as mentioned below:
  • Dismount the PWA content databases from its currently associated web application that host the PWA instance.

  • Perform a ‘Dismount-SPContentDatabase‘ for the PWA content database.

    Dismount-SPContentDatabase WSS_Content_PWA

Note

The Dismount-SPContentDatabase cmdlet detaches the content database from the Web application, but it does not delete the content database from SQL Server, but it does not delete the content database from SQL Server.
  • After performing ‘Dismount-SPContentDatabase’, you should note that the dismounted database has been removed from Content Databases in Central Administration as shown below,
Dismount Web Application Content Databases
  • Again, Dismount the ‘WSS_Content’ Content Database.

    Dismount-SPContentDatabase WSS_Content

Restore the source databases backup

In this step, we will restore the database backup that was taken from the source farm to the destination farm by doing the following:
  • Move the databases backup from the source farm to appropriate path in SQL Server of the destination farm.

    • ProjectWebApp.
    • WSS_Content.
    • WSS_Content_PWA.

  • Open the SQL Server Management Studio.
  • Connect to the SQL Serve instance.
  • Perform the restore operation for each database as shown below.

  • Repeat the above steps for other databases.

Mount ‘WSS_Content‘ Content Database

Once the restore operation has been done, we should now mount (reattach) each database again to its web application as mentioned below:
  • Run the ‘Mount-SPContentDatabase’ for ‘WSS_Content’ database to attach it to its web application that host the PWA instance.

    Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication http://sitename

Mount ‘WSS_Content_PWA‘ Content Database

  • Again, Mount ‘WSS_Content_PWA’ database to the web application that host the PWA instance.

    Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication http://sitename

Mount ‘ProjectWebApp‘ Project Database

  • You should now Mount the ‘ProjectWebApp’ database to the web application that host your PWA instance.

    Mount-SPProjectDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication http://sitename

Mount the PWA Instance

  • Mount the PWA Instance to associate the PWA site collection to its Project Web App database.

    Mount-SPProjectWebInstance -SiteCollection http://SERVER/pwa -DatabaseServer" "SQLSERVER" -DatabaseName "ProjectWebApp"

  • To make sure that the PWA Instance has been mounted and provisioned successfully.

    • Open Central Administration > Application Management > Click on Manage Service Application.
    • Click on PWA service application, the PWA instance should be now listed.

Deploy the Custom WSP Solutions

In case you have custom solutions you should follow the mentioned steps below,
  • Check if you have a DLL files in the bin folder of web application.

    • Copy all DLL files in the ‘bin‘ folder of source web application that located in\\inetpub\wwwroot\wss\VirtualDirectories\[Web Application Port Number]\bin
    • Paste DLL’s to the ‘bin‘ folder of destination web application.

  • Now, install and deploy the WSP solutions that you have backup from source farm to destination farm as mentioned at Install and deploy a SharePoint (WSP) Solution Package using SharePoint Shell.

  • Make sure that the solutions have been deployed successfully by going to Central Administration > System Settings > Manage Farm Solution.

Change the site collection administrator

To avoid the access permission issue: Sorry, this site hasn’t been shared with you.

You should change the Site collection administrators for the web application as the following:
  • Open Central Administration > Application Management > Change Site Collection Administrators.
  • Select your Web Application > Select the PWA site collection.
  • Remove the old site collection administrators then add the new site collection administrators of the current farm.

Change PWA Instance Administrator

  • Open Central Administration > Application Management > Manage Service Application.
  • Click on PWA service application to show the provisioned PWA instance.
  • Edit the PWA instance as shown below.
  • Provide the New PWA Instance Administrator Account.

Perform a Bulk Update Connected SharePoint Sites

Perform a Bulk Update to re-linking the projects with its related connected SharePoint sites as the following:
  • Go to Central Administration > General Application Settings > PWA Settings > Manage.

  • Click On Bulk Update Connected SharePoint Sites.
  • Select and Set the New Site Path.

Update Project Server Cube Settings

In case you have configured the Project Server Cube, you should update and refresh the OLAP Database Management as the following:
  • Go to Central Administration > General Application Settings > PWA Settings > Manage > OLAP Database Management.
  • Update and refresh the OLAP Database Management.

Conclusion

In this article, I explained how to migrate/move a PWA Instance from one farm to another in Project Server 2013.