Approaches to Backup and Restore a Sharepoint Farm April 29, 2009
Posted by rehmangul in Blogroll, MOSS, MS SharePoint Sever, sharepoint, sps.Tags: central administration, configuration wizard, configuration wizard errors, Custom Sharepoint, customise, errors, fix, integration, MOSS, moss customisation, moss errors, move from testing to production, move to another farm, Service Unavailable, SharePoint Customization, sharepoint errors, sharepoint farm, stsadm, tips and tricks, workarounds
add a comment
It is important to understand the differences between MOVING, MIGRATING or UPGRADING a farm:
http://technet.microsoft.com/en-us/library/cc262370.aspx
I’ll slightly touch these at the bottom of this article. Mainly, I am going to discuss approaches how can you MOVE from one farm to another.
MOVING to another farm:
If you are moving from a test farm to a production farm, this involves MOVING a farm. You must have similar hardware (32-bit or 64-bit which ever) and you must have similar software (version of sharepoint, windows, all software updates) and you must have similar topology (server names, number of servers) on the farm you are MOVING to.
The reason is becasue the configuration database and the Central Admin database contain computer-specific information. For that reason, you can only move to a new farm if you can configure it to be exactly the same as your original farm. Configuration database will not work for a new environment where topology, server roles or software updates are different.
Okey, if you do not have the same hardware, software or topology, then what to do? Then you should move everything in the farm except Configuration and Central Admin databases, and configure the new farm on your own, wihout expecting this to be done by the restore procedure, since we are not restoring configuration database. OR, you should consider MIGRATING or UPGRADING:
http://technet.microsoft.com/en-us/library/cc262370.aspx
So, let talk about MOVING to another farm. Microsoft says this is the way to “Move to another farm”:
http://technet.microsoft.com/en-us/library/cc261918.aspx
This page has a lot of information, hidden and obvious, I wish to consolidate it here:
There are three possible ways through which you can Backup and Restore your farm (note that I said backup/restore, not move):
- STSADM
- Central Admin
- Sql Server (lets ignore DPM and the others for the time being)
But there is only one way to MOVE your farm to another farm and that is:
- Sql Server (tools)
MIGRATING to another farm using STSADM and Central Admin (tools) is regarded as obsolete. That means if you are moving to a new or different farm, you should not use Central Admin or STSADM command. So, moving or migrating whatever you may want to call it (because here it just means moving to a different environment), STSADM and Central Admin approach is obsolete. (I couldn’t find anywhere where Microsoft supports/permits you to MOVE to another/different/new farm using STSADM or Central Admin).
http://technet.microsoft.com/en-us/library/cc262281.aspx (Migrating through Central Admin (Obsolete))
http://technet.microsoft.com/en-us/library/cc263236.aspx (Migrating through STSADM (Obsolete))
We can restore our farm using STSADM and Central Admin, only on the SAME farm from which the backup was taken i.e. no new farm is involved at all:
http://technet.microsoft.com/en-us/library/cc261704.aspx (Restore using STSADM)
http://technet.microsoft.com/en-us/library/cc262928.aspx (Restore using Central Admin)
If you will use Central Admin, you will select “Same Configuration” option for the “Type of Restore” radio button. And for STSADM, you will use “overwrite” value for “-restoremethod” parameter. Using Central Admin, you can take farm level backup but it will not let you restore Central Admin and Configuration databases saying that “Central Admin and Configuration databases cannot be restored from this user interface”.
Now the only way left while moving to a new farm is SQL Server (tools):
http://technet.microsoft.com/en-us/library/cc261918.aspx
After we have reached this decision, remember that there could be two possibilites:
- Your new farm on which you are restoring may have different specs from the farm from which the backup is taken from. Specs means server names, software updates, number of servers.
- Your new farm may have exactly the same specs as the farm from which the backup is taken from.
If you plan to move Config and Central Admin databases, your new farm MUST have the same specs. If your new farm has different specs, then you should not move Config and Central Admin databases.
“Move to another farm” (http://technet.microsoft.com/en-us/library/cc261918.aspx) provides a step by step procedure to move to a new farm, and it assumes that sharepoint is already installed on the destination farm, which essentially means that Configuration and Central Admin databases are already created. So, if you have the same specs for your new farm, you can go ahead and overwrite Config and Central Admin databases, this will restore the configuration from the backup set.
Now it could be the case that you can live without moving Configuration and Central Admin databases to the new farm i.e. you will configure the new farm by yourself and you dont need to transfer Config and Central Admin databases from your old farm. So, what will you move then:
- Content Databases
- SSP Databases
- Search Databases for SSPs
- Search Databases
However, above databases can also be restored using Central Admin and STSADM approaches.
Summary: Moving to a new farm involves SQL Server and a farm with similar specs, otherwise do not move Config and Central Admin databases.
If you are looking to Move only the Content Databases, here is the one stop shop:
http://technet.microsoft.com/en-us/library/cc262792.aspx
MIGRATING to another farm:
If you are changing from 32-bit hardware to 64-bit hardware, this will also be a MIGRATION process (i.e. change in hardware specs as mentioned earlier). If you are planning to change your existing SharePoint Server 2007 platform to Windows Server 2008 (platform), you might have to change to 64-bit hardware. And to upgrade Microsoft Office SharePoint Server 2007 to a 64-bit environment, you must migrate existing servers to a new farm. You cannot upgrade Office SharePoint Server 2007 directly from the 32-bit edition of Office SharePoint Server 2007 to the 64-bit edition.
http://technet.microsoft.com/en-us/library/dd622865.aspx
UPGRADING a farm:
Upgrade is when you are moving to a different version of SharePoint Server e.g. from SharePoint 2003 to SharePoint 2007.
If you are moving just the database server (all databases including Config and Central Admin) and not the whole farm, look here:
http://technet.microsoft.com/en-us/library/cc512725.aspx#Section1
If you wish to ditch the farm level backup/restore and just move your website (site collection) to the new farm (and save yourself a lot of hassle), have a look here:
http://rehmangul.wordpress.com/2009/04/18/sharepoint-site-backup-and-restore/
After release of SP2 and CU for April, you can safely backup and restore your site collections to a new farm, without worrying about absolute URL issues:
Hope this helps….
SharePoint Site Backup and Restore April 18, 2009
Posted by rehmangul in Blogroll, MOSS, MS SharePoint Sever, development, error, sharepoint, sps.Tags: Custom Sharepoint, customise, errors, fix, integration, Internet Explorer Errors, MOSS, moss customisation, moss errors, Service Unavailable, SharePoint Customization, sharepoint errors, sharepoint site backup and restore, tips and tricks, workarounds
6 comments
If you are moving your site from testing to production, site backup and restore (using STSADM command line tool) is the way to go. Other ways include SQL Server, Sharepoint Designer, DPM etc. However, site backup and restore using STSADM is probably the easiest and fastest one.
Backup the site using the following STSADM Command:
Stsadm –o backup –url http://<server name>:<port> -filename <path\name to be used for the backup file>
Example:
Stsadm –o backup –url http://vanillargk:5555 –filename e:\backup5555.bak
After the backup has been completed, “Operation Completed Successfully” message should be displayed.
Create a new Web Application for restoring the site:
Go to Central Administration -> Application Management -> under SharePoint Web Application Management -> click Create or Extend Web Application. Fill in the required information, click Ok and wait until the progress continues.
Once the new web application is created, run the following STSADM command and restore the site using the backup file created above.
Stsadm –o restore –url http://<server>:<port> -filename <path\name of the backup file>
Stsadm –o restore –url http://vanillargk:6666 –filename e:\backup5555.bak
Restored site should be up and running.
If it is not (and you are receiving weird errors in your browser), keep reading:
Now it could be the case that you have customized your site. So, we must deploy those customizations properly for the site to work as expected. This is typically a scenario while moving your site from Testing to Production environment. First you have to add the solutions (if any created) to the farm.
Add a Solution to the SharePoint Farm:
Add the solution package to the farm by running the following commands. Make sure full path of WSP file is supplied.
stsadm –o addsolution –filename <path to mysolution.internet.test.wsp>
Deploy the Solution to the restored site:
Now we need to deploy the newly added solution to our restored site. Click the solution name and select ‘Deploy’ button from top. Select the appropriate web application in the deployment settings and click OK. This will take several minutes to deploy mysolution.internet.test.wsp resources (list templates, features, assemblies, master pages, styles). Once the solution has been deployed, reset IIS to ensure all deployed changes are picked up by the web application.
You can also deploy the solution from the command line with the following SharePoint admin command.
stsadm -o deploysolution -name mysolution.internet.test.wsp -url <site> -immediate -allowgacdeployment –allowcaspolicies
Make sure all your assemblies (DLLs) are available in Global Assembly Cache (GAC) usually placed at c:\windows\assembly.
Activate features installed by mysolution.internet.test.wsp solution package:
Go to the newly restored site, click Site Actions, click Site Settings, click Site Collection Features. Click Activate button to activate any Site Collection Feature.
Go to the newly restored site, click Site Actions, Site Settings, Site Features.
Click Activate button to activate any Site Features.
Update Web.Config file:
It will be usually a case that your solution package will deploy a few DLLs with it. So we need to add all those Safe Control entries, Assembly Bindings, Keys and any other web.config changes to our newly restored sites’s web.config. Weird browser errors that I mentioned above usually appear due to these missing entries in web.config, specially when you are restoring on the same machine/server…….As assemblies will already be there in the GAC if the restore operation was performed on the same machine….you just need to make web.config entries to the restored site…..adding and deploying of the solution could be skipped. So lets do the copy paste operation from the old web.config to the new web.config. Just compare the two web configs and copy/paste the missing entries into the new.
Web.config file could be found at the following path:
<drive letter>:\Inetpub\wwwroot\wss\VirtualDirectories\<port number>\web.config
Example:
C:\Inetpub\wwwroot\wss\VirtualDirectories\6666\web.config
Usually these changes will include Safe Controls, AssemblyBindings, PageParserPaths and Keys etc. After making these changes your site should be ready in Production.
If you are worried about the bad habit of Moss saving absolute URLs for the page layout in the properties of a publishing page, then relax, solution is already in the market:
Hope this helps…
P.S. If you need to know more, important information in the comments below.
“Title” field issue with Document Information Panel April 1, 2009
Posted by rehmangul in MOSS, MS SharePoint Sever, sps.Tags: Custom Sharepoint, customise, Document Information Panel, errors, fix, integration, Microsoft Office, Microsoft Word, MOSS, moss customisation, moss errors, Office 2007, SharePoint Customization, sharepoint errors, tips and tricks, workarounds
2 comments
Error26:
Scenario:
Title field is set as required in one of the Content Types used in a doc lib. However, when you open the document in Office and save it without providing any value for Title field, the document is saved, then Office will ask if you want to “check in” the doc, you will say Yes and select Major Version: At this point you receive an error message saying:
“Cannot perform this opertation. The file is no longer checked out or has been deleted.”
OR
“This file could not be checked in because the original version of the file on the server was moved or deleted. A new version of this file has been saved to the server, but your check-in comments were not saved………To save comments with the new version of this file on the server, you must delete the local copy of this file, check out the file from the server again, and then check in the file with any comments you want to add.”
You will try many things but fail. Moreover, you will find no logical explanation. Finally you will google the crap thing and may reach this post…..
Not me but Microsoft seems to be the saviour:
Here is the known issue and the hotfix:
http://support.microsoft.com/kb/950132
For a more verbose description:
http://www.sharepointblogs.com/roni/archive/2008/11/02/moss-2007-wss-3-0-integration-with-office-2007-clients.aspx
Hope this helps…..
MS CRM and SharePoint 2007 Integration: May 8, 2007
Posted by rehmangul in MOSS, MS CRM, MS SharePoint Sever, development, sharepoint, sps.Tags: Custom Sharepoint, customise, integration, MOSS, moss customisation, SharePoint Customization, tips and tricks, workarounds
13 comments
SharePoint 2007 provides integration with quite a few Microsoft products including Dynamics, SQL Server Reporting Services, PerformancePoint, etc. Today, we will specifically talk about SharePoint’s integration with MS CRM. Here is the press release from Microsoft announcing the ability of SharePoint to provide tight integration with MS CRM environment:
http://www.microsoft.com/presspass/press/2007/mar07/03-12Day1DynamicsOfficePR.mspx
Lets have a walkthrough of how can we connect with MS CRM using SharePoint’s Business Data Catalog (BDC) and Web Parts.
First of all we need an XML definition file to connect with CRM Database. Writing these files is difficult and error prone. You can easily find tools over the internet that will provide you with the ability to create Application Definitions for MOSS 2007. One such tool could be found here.
Here is the file I am going to use for the purpose of this exercise. This sample metadata XML defines various entities for MS CRM 3.0 database. If you have downloaded Dynamics Snap-ins, you can get one such file already present on your disk. If you intend to use the file that I am using, remember to change the Server and Database Names in it. They have been marked within the file…changes are required at the line 27 and 29.First of all we need to import this definition file to MOSS (Microsoft Office SharePoint Server) 2007.
Go to central Administration. It is usually created at the port 12779. The Url should look something like this:
http://moss:12779/default.aspx
On the left Navigation Column click “SharedServices1” link. If its not there, you can create one clicking “Shared Services Administration” link on the left navigation column. “SharedServices1” site should look like this:
Under “Business Data Catalog” click “Import application definition”. Following screen appears:
Browse and select the definition file from your disk. Keep the default settings and click “Import”. This will initiate the upload process and take some time.
After the file has been uploaded you can view the file clicking “View applications” under “Business Data Catalog”.
Now go to the site where you want to provide CRM connectivity. Click “ Site Actions” and “Edit Page”.
From the list select “Business Data List” web part and click “Add”.

Click “open the tool pane” link in the “Business Data List” web part.
Click “Browse” icon right next to the “Type” text box displayed on the right top.
Select any “Business Data Type” and click “Ok”.
Click “Ok” at the bottom of the options displayed in the right column.
Hope you enjoyed this post….I’ll continue on SharePoint’s integration with other Microsoft Products….hope to see you again….it’s bye for now……:)
Key Performance Indicators (KPIs) in MOSS 2007 May 4, 2007
Posted by rehmangul in Blogroll, MOSS, MS CRM, MS SharePoint Sever, Project Server, development, moss kpi, sharepoint, sharepoint key performance indicators, sharepoint kpi, sps.Tags: Coding SharePoint, Custom Sharepoint, customise, errors, integration, MOSS, moss customisation, moss errors, SharePoint Customization, sharepoint errors, tips and tricks, workarounds
13 comments
Key Performance Indicators (KPIs)
A Key Performance Indicator (KPI) is a visual signal that tells us the amount of progress made towards a goal. In this article lets see how to create and display KPIs by using Microsoft Office SharePoint Server 2007 KPI list.
How-To
KPIs are valuable resources to evaluate progress against measurable goals. To create and publish KPIs, there is a four step procedure.
Create a KPI list
Add the KPI to the list
Add a Web Part to a Web page
Link the KPI list to the Web Part.
First of all we need to choose a KPI Type:
KPI types
Using data in SharePoint lists
When SharePoint lists contain items that you can count, items that are part of a workflow, or items that contain dates, you can use a KPI to track how long the issues or tasks have been open, how many are open, and what percentage of a task is complete.
Using data in Microsoft Office Excel workbooks
You can set up a KPI in an Excel workbook and link to the KPI from Office SharePoint Server 2007. As the data in the workbook changes, the KPI is automatically updated.
Using data from Microsoft SQL Server 2005 Analysis Services
Office SharePoint Server 2007 can use KPIs from Analysis Services, a component of Microsoft SQL Server 2005. A systems administrator or database analyst usually sets up these KPIs and registers the data connection with Office SharePoint Server. Then, anyone with the appropriate permissions can access the database and link to the Analysis Services KPIs.
Using manually entered information
In situations where there is no formal system set up or you have a one-time project to track, you can use this KPI and enter the criteria manually. This KPI is useful for displaying information that is communicated in e-mail or some other nonstructured system.
Create a KPI list
You can create KPI lists in the Reports Library of the Reports Center in a team or organization site, so that other people easily can find them.
1. In the site where you want to create the KPI list, on the default page of the Report Center, click Site Actions, and then select View All Site Content. Under the All Site Content heading, click Create.
2. On the Create page, under Custom Lists, click KPI List.
3. Type a name and an optional description for the KPI list.
4. Click OK.
You now have a KPI list to which you can add one or more KPI types.
Add a KPI to the KPI list
1. On the KPI list toolbar, click the arrow next to New.
2. Select “Indicator using data in SharePoint list” KPI type.
3. On the New Indicator page, do the following:
a) In the Name and Description boxes, type a name and optional description for the indicator.
b) In the Comments box, type text to help people who are viewing the KPI understand what it represents.
c) Under SharePoint List and View, in the List URL box, enter the URL of the list or library.
d) In View, select the view that contains the items you want to use in the KPI.
e) Under Value Calculation, select one of the following ways to calculate the goal of the KPI:
Number of list items: A count of the total number of items in the list.
Percentage of list items: A calculation that compares the value of a content type within a column or up to five columns in the list.
Calculation using all list items in the view: A computation of Total, Average, Maximum, or Minimum of a numerical column in the list. Note The Calucaltion using all list items in the view option is only available if your list includes a numerical field.
4. In the Status Icon section, under Status Icon Rules, in the Better values are list, select higher or lower to indicate which range of numbers will be green.
5. Type the values for the status indicators in the boxes. For example, to track the minimum percentage complete for a set of tasks, you can set the green indicator at the goal value and the warning value to be one less than the goal value. In that case, if you want to see when the minimum percentage complete drops below 25 percent, you set the green indicator to 25 and the yellow indicator to 24.
After you add all of the KPIs that you want to the KPI list, you can publish them on a Web page by using one of two KPI Web Parts.
Publish the KPI on a Web page
After you add one or more KPI types to the KPI list, you can display the KPI list on My Site, a team site, or any other SharePoint page. In addition, the KPI list is available for use by anyone in your organization who has permissions to access it. You can use one or all of the KPIs that appear on the list. To display the KPIs, you edit the Web page where you want to display the KPI list and add a KPI Web Part. To display the entire KPI list, use the KPI List Web Part. To show only one of the KPIs from the list, use the KPI Details Web Part.
Add a Web Part to a page
1. On the page where you want to add the KPI, click Site Actions, and then select Edit Page.
2. In the zone in which you want to add the KPI, click Add a Web Part.
3. In the Add Web Parts dialog box, in the All Web Parts section, under Dashboard, do one of the following.
To insert the entire KPI list, select Key Performance Indicators.
To choose one KPI from the KPI list, select KPI Details.
4. Click Add.
Link the KPI list to the Web Part
1. In the Web Part, click Open the tool pane.
2. In the tool pane, under Indicator List, navigate to and double-click the KPI list that you created in the previous set of procedures. The list may be in the Report Center of the site.
3. Select one of the KPIs in the list. (If you selected the KPI List, the entire list is displayed.)
4. Click OK.















