How to recover Project Server 2007 or 2010 workspace/s when problems occur trying to recover a PWA site

Article translations Article translations
Article ID: 963124 - View products that this article applies to.
Expand all | Collapse all

On This Page

Summary

This article describes several methods that you can use to recover a project workspace site when the problems that are mentioned in this "Summary" occur.

Project workspaces are saved in a content database for the Web application that hosts the Project Web Access site. If a Project Web Access site is unavailable, or if it has to be recreated by using the Project Server databases because a full-farm backup has not been created, you may have to move the project workspaces from the content database for the Web Application to another content database for the Web Application in order to restore the links and functionality of the project workspaces.

You may encounter problems when, as an administrator, you move a Project Web Access site, or you try to recover a server that is hosting a Project Web Access site. Problems that you may encounter when you do this include the following:
  • A project workspace link is broken.
  • A project workspace does not exist.
  • A Project Web Access site cannot be accessed.
Additionally, when you try as a user to browse to the URL of a Microsoft Office Project Server 2007 project workspace or 2010 Pprject site, or you click the link to a project workspace in a Project Web Access site, you receive the following error message: 
The page cannot be found.

More information

The information in this article also applies to both Project Server 2007 and 2010, however there are a couple differences in terminology that should be called out. For example in Project Server 2010 the term workspaces is replaced with Project Sites and the 2007 Site Relinker tool is now a feature in Project Server 2010 called "Bulk Update Project Sites" in Server Settings under Operational Policies.

To resolve these problems, use one of the following methods, as appropriate for your situation:
  • If the Project Web Access site can be accessed and must be re-provisioned, use Method 1.
  • If the Project Web Access site cannot be accessed or has moved from one server to another, use Method 2.
  • If you selectively replace project workspaces, use Method 3.
Notes
  • Before you use one of the following methods, create a new backup of any Project Server database and of any SharePoint database that are needed for the project workspace or for the Project Web Access site.
  • If a project workspace has a subsite, the subsite has to be manually recreated before you run the Import.bat file. For example, the following URL is for a project workspace subsite:
    http://<ServerName>/<PWASite>/<ProjectWorkSpace>/<ProjectWorkSpaceSubSite>
  • Use quotation marks (" ") around any project workspace URL or file name that contains spaces. If you do not use the quotation marks, any text that occurs after a space in the URL or file name is omitted, and the export or import commands do not finish as expected.
  • The SharePoint commands for Export and Import, in this article, work on one workspace at a time. To export or import multiple workspaces is accomplished by creating an export batch file to loop through the text file crearted in step 1 (for both method 1 and 2). See the Workaround section of this article for information on batch processing.

Method 1: The Project Web Access site can be accessed and must be re-provisioned

  1. At the command prompt on the server that is running Microsoft Windows SharePoint Services, type the following commands, and then press ENTER after each command:
    cd \program files\common files\microsoft shared\web server extensions\12\bin

    stsadm -o enumsubwebs -url http://<servername>/<pwainstancename> > c:\sites.txt
    Notes
    • The <servername> placeholder is the name of the server that is running Project Server 2007, and the <pwainstancename> placeholder is the instance name for Project Web Access.
    • The "stsadm" command saves the Sites.txt file to the root directory of drive C.
  2. Open the Sites.txt file in Notepad, and then make the changes as appropriate for the EXPORT command for your Project Web Access workspace. The following is an example of the EXPORT command:
    stsadm -o export -url "http://<servername>/<pwainstancename>/<workspacename>" -filename "c:\<backupdir>\<workspacename>" -nofilecompression -includeusersecurity -versions 4
    Note The <servername> placeholder is the name of the server that is running Project Server 2007. The <pwainstancename> placeholder is the instance name for Project Web Access. The <workspacename> placeholder is the name of the workspace, and the <backupdir> placeholder is name of the directory in which you want to save a backup of the workspace.
  3. On the File menu, click Save As, name the file Export<pwainstancename>.bat, and then save the file as a text file to the following directory:
    drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin
    Note The <pwainstancename> placeholder is the instance name for Project Web Access.
  4. Change the EXPORT command in the Sites.txt file to an IMPORT command. The following is an example of the IMPORT command:
    stsadm -o import -url "http://<servername>/<pwainstancename>/<workspacename>" -filename "c:\<backupdir>\<workspacename>" -nofilecompression -includeusersecurity
    Note The <servername> placeholder is the name of the server that is running Project Server 2007. The <pwainstancename> placeholder is the instance name for Project Web Access. The <workspacename> placeholder is the name of the workspace, and the <backupdir> placeholder is name of the directory where the backup file for the workspace is located.
  5. On the File menu, click Save As, name the file Import<pwainstancename>.bat, and then save the file as a text file to the following directory:
    drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin
    Note The <pwainstancename> placeholder is the instance name for Project Web Access.
  6. Run the Export<pwainstancename>.bat file. This may take a long time if there are many workspaces.
  7. In SharePoint Central Administration, delete the Project Web Access site. To make sure that the Project Web Access site is deleted, monitor "Define Managed Paths."
  8. Provision a new Project Web Access site by using the same instance name and databases.
  9. Browse the Project Web Access site to make sure that the site is functional.
  10. Run the Import<pwainstancename>.bat file. This may take a long time if there are many workspaces.
  11. Check the functionality of the project workspaces.

Method 2: The Project Web Access site cannot be accessed or has moved from one server to another

Note Before you follow these steps, make sure that the Project Web Access path does not exist in "Define Managed Paths" in SharePoint Central Administration.
  1. Restore the most recent backup of the content database by using a new instance name for the server that is running Microsoft SQL Server.
  2. Create a new Web Application on port 1.
  3. In SharePoint Central Administration and then on the server that is running SQL Server, delete the content database that was created in step 2.
  4. At the command prompt on the server that is running Microsoft Windows SharePoint Services, type the following commands, and then press ENTER after each command:
    cd \program files\common files\microsoft shared\web server extensions\12\bin

    stsadm -o addcontentdb -url http://<servername>:1 -databasename <databasename>
    Note The <servername> placeholder is the name of the server that is running Project Server 2007, and the <databasename> placeholder is the name of the content database. In SharePoint Central Administration, verify that the content database is attached as expected.
  5. At a command prompt, type the following commands.

    Note Press ENTER after each command.
    cd \program files\common files\microsoft shared\web server extensions\12\bin

    stsadm -o enumsubwebs -url http://<servername>:<port number>/<pwainstancename> > c:\sites.txt
    Notes
    • The <port number> place holder is the port where the site resides. In this sample, the site is created on port 1.
    • The <servername> placeholder is the name of the server that is running Project Server 2007, and the <pwainstancename> placeholder is the instance name for Project Web Access.
    • The "stsadm" command will save the Sites.txt file to the root directory of drive C.
  6. Open the Sites.txt file in Notepad, and then make the changes as appropriate for the EXPORT command for your Project Web Access workspace. The following is an example of the EXPORT command:
    stsadm -o export -url "http://<servername>/<pwainstancename>/<workspacename>" -filename "c:\<backupdir>\<workspacename>" -nofilecompression -includeusersecurity -versions 4
    Note The <servername> placeholder is the name of the server that is running Project Server 2007. The <pwainstancename> placeholder is the instance name for Project Web Access. The <workspacename> placeholder is the name of the workspace, and the <backupdir> placeholder is name of the directory where you want to save a backup of the workspace.
  7. On the File menu, click Save As, name the file Export<pwainstancename>.bat, and then save the file as a text file to the following directory:
    drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin
    Note The <pwainstancename> placeholder is the instance name for Project Web Access.
  8. Change the EXPORT command in the Sites.txt file to an IMPORT command. The following is an example of the IMPORT command:
    stsadm -o import -url "http://<servername>/<pwainstancename>/<workspacename>" -filename "c:\<backupdir>\<workspacename>" -nofilecompression -includeusersecurity
    Note The <servername> placeholder is the name of the server that is running Project Server 2007. The <pwainstancename> placeholder is the instance name for Project Web Access. The <workspacename> placeholder is the name of the workspace, and the <backupdir> placeholder is name of the directory where the backup file for the workspace is located.
  9. On the File menu, click Save As, name the file Import<pwainstancename>.bat, and then save the file as a text file to the following directory:
    drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin
    Note The <pwainstancename> placeholder is the instance name for Project Web Access.
  10. Run the Export<pwainstancename>.bat file. This may take a long time if there are many workspaces.
  11. Provision a new Project Web Access site by using the same instance name and databases. Or, use a new instance name with the databases.
  12. Browse the Project Web Access site to make sure that the site is functional.
  13. Run the Import<pwainstancename>.bat file. This may take a long time if there are many workspaces.
  14. Check the functionality of the project workspaces.

    Note If the project workspaces are not linked, you must run the Project Workspace Site Relinker tool. For more information, visit the following Microsoft TechNet Web site:
    http://technet.microsoft.com/en-us/library/cc197498.aspx
  15. Delete the temporary Web application in SharePoint Central Administration, and then use Internet Information Services (IIS) to verify that it was removed.
  16. Delete the restored content database on the server that is running SQL Server.

Method 3: You selectively replace project workspaces

  1. Restore the most recent backup of the content database by using a new instance name for the server that is running Microsoft SQL Server.
  2. Create a new Web Application on port 1.
  3. In SharePoint Central Administration and then on the server that is running SQL Server, delete the content database that was created in step 2.
  4. At the command prompt on the server that is running Windows SharePoint Services, type the following commands, and then press ENTER after each command:
    cd \program files\common files\microsoft shared\web server extensions\12\bin

    stsadm -o addcontentdb -url http://<servername>:1 -databasename <databasename>
    Note The <servername> placeholder is the name of the server that is running Project Server 2007, and the <databasename> placeholder is the name of the Project Server database. In SharePoint Central Administration, verify that the content database is attached as expected.
  5. Obtain the URL of the project workspace that you must replace.
  6. At a command prompt, type the following command, and then press ENTER to export the source project workspace to a local file:
    stsadm -o export -url "http://<servername>:1/<pwainstancename>/<workspacename>" -filename "c:\<backupdir>\<workspacename>" -nofilecompression -includeusersecurity -versions 4
    Note The <servername> placeholder is the name of the server that is running Project Server 2007, the <pwainstancename> placeholder is the instance name for Project Web Access, and the <workspacename> placeholder is the name of the project workspace.
  7. Delete the old project workspace. To do this, open Project Web Access, and then click Project Workspaces on the Server Settings menu.
  8. At a command prompt, type the following command, and then press ENTER to import the project workspace from the local file:
    stsadm -o import -url "http://<servername>/<pwainstancename>/<workspacename>" -filename "c:\<backupdir>\<workspacename>" -nofilecompression -includeusersecurity
    Note The <servername> placeholder is the name of the server that is running Project Server 2007. The <pwainstancename> placeholder is the instance name for Project Web Access. The <workspacename> placeholder is the name of the project workspace, and the <backupdir> placeholder is name of the directory where the backup file for the workspace is located.

Workaround

Batch Processing: This section discusses how to create a batch files to replace the single commands forexport and import discribed in methods 1 and 2 above.

1. Use the Enumsubwebs command to capture the site URLs into the text file sites.txt:

stsadm.exe -o enumsubwebs -url http://Servername/pwa > c:\sites.txt

2. Edit the text file to remove the tags at the beginning of the URL for each site. The result should look similar to this format:

PWA/My Project Site

3. Export Batch File: Copy the following lines into notepad and save it as "Batch” file. i.e. export.bat

Echo on

cd C:\

cd "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>"

for /f "tokens=1,2,3* delims=/" %%a in ('type c:\sites.txt') do stsadm.exe -o export -url "http://Servername/%%a/%%b" -filename "c:\%%b.bak" -includeusersecurity


"Echo on" allows you will see the commands in the command window as they process.

"CD C:\" places the starting point at the root directory to avoid errors.

"cd 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>' ", this is the location of the stsadm.exe file.

The command uses a "for" loop to run the same command on each line of the text file. It pulls the first part of the URL into a variable location called
%%a and with the delimiter "/" which puts the next part of the URL into %%b. The export command pulls the content from the sites and places it in a .bak file in the C:\ directory and names the file with the %%b or project name as the filename. -Includeusersecurity pulls the security from each site and stores that in the .bak file.

Note: Note: You will see a .log file for the backup process in the directory with the .Bak file.

4. Place both the export.bat file and the sites.ext file in the same directory. Run the export.bat file

5. Import Batch File: Copy the following lines into notepad and save it as a “Batch” file i.e. import.bat. This command reads from the same

Echo on

cd C:\

cd "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>"

for /f "tokens=1,2,3* delims=/" %%a in ('type c:\sites.txt') do stsadm.exe -o import -url "http://Servername/PWA2/%%b" -filename "c:\%%b.bak" -includeusersecurity

This batch file runs the command against each URL in the sites.txt file. It takes the project name and populates a new site with the content and permissions from the .bat file stored in the C:\ directory.

6. Place the import batch file in the same directory with sites.txt and then run the import batch file.

Properties

Article ID: 963124 - Last Review: June 24, 2013 - Revision: 5.0
Applies to
  • Microsoft Office Project Server 2007
  • Microsoft Project Server 2010
Keywords: 
kbhowto kberrmsg kbexpertiseadvanced kbtshoot kbsurveynew kbprb KB963124

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com