Tuesday, December 5, 2006

Restoring SharePoint Portal Server 2003

OK, so you have a backup plan for SharePoint that uses the spsbackup which is the Backup and Restore application in the Start Menu that comes with SharePoint Portal Server 2003 (SPS). The question now what needs to be done if the server goes down. Well, that fully depends on what size farm you have configured SharePoint to use. For simplicity we will assume you have just one server and everything is running on. Let's also assume that we have configured SharePoint as a Server Farm installation. This allows us to use SQL Server 2000 instead of MSDE. Here is a summary of the environment I am assuming in this example:
  • SQL Server 2000 SP4
  • IIS 6 with ASP.Net 1.1 installed only (no ASP.Net 2.0 as it doesn't work with SharePoint prior to SharePoint Portal Server 2003 Service Pack 2). You should be able to install ASP.Net 2.0, but your Search for SPS won't work until you patch SPS to SP2.
  • SharePoint Portal Server 2003 (SPS)
  • Windows SharePoint Services (WSS)
  • SharePoint Portal Server 2003 Service Pack 2 (SPS-SP2)
  • Windows SharePoint Services Service Pack 2 (WSS-SP2).
The short answer is you need a machine that has the same programs, service packs, versions, etc. Then restore everything via spsbackup. Here is a little more detail:
  1. Install SQL Server 2000
  2. Install SQL Server Service Pack 3 or above. Ideally, this should match whatever you are using on the production server for SharePoint, though it is not required in most cases.
  3. Install IIS and ASP.Net. I recommend using the Mnage Server app to install them. It is quick and painless. Just select the IIS and ASP.Net role.
  4. Reapply Windows Server 2003 Service Pack so that IIS will be patched also.
  5. Install SharePoint Portal Server 2003.
  6. Install Windows SharePointPortal Server.
  7. Install Service Pack 2 for SharePoint Portal Server 2003. NOTE: Service Packs may overwrite customizations.
  8. Install Service Pack 2 for Windows SharePoint Services.
  9. Install any templates, sites definitions, configuration file changes, customizations, etc.
  10. At this point the backup server and the production server should have identical environments. At this point, you can create a new portal if you haven't already and verify that SharePoint Portal Server 2003 and at least one WSS site works ok.
  11. Run spsbackup and restore SharePoint.
  12. Testing restore. You will probably note that SPS search doesn't work as expected, and that Sites directory in SPS still point to old server. This is not an issue in a real emergency restore situation where the url will not change, but if you use these steps to restore to a test server for example you need to make some changes. The simplist solution appears to be to do a search and replace in the databases for SharePoint ( 4 of them, but not all have references to url). I recommend this stored procedure that can be added to each of the databases and used to search and replace url. There is also a search only (no replace) that you can use to just see what changes will be made if you do the search and replace. One bit of warning, I read that some data is not stored in plain text and is blob, etc columns which this procedure does not operate on. I have not seen this, I just read about someone having an issue. Please let me know if you notice an issue.
  13. Upgrade SQL Server 2000 to SQL Server 2005. This step makes upgrading to SQL Server 2005 easiest since there is no backup and restore. This step is optional and should only be done if you want to use SQL Server 2005 as your database AND do not want to have a separate instance of SQL Server 2000 still running. If you want to have both SQL 2000 and SQL 2005 on the same machine, you will need to backup and restore to SQL 2005. There have been some other people reporting that spsbackup doesn't work with SQL Server 2005. This is true I think only if you do NOT have SPS-SP2. Without SPS, SQL Server 2005 is not supported.
  14. Do a backup using spsbackup. You existing (pre-SPS-SP2) backups will no longer be able to be restored using SPS-SP2 spsbackup. So, you will probably want to get a new backup.

No comments: