How to Save a Site as a Template in SharePoint 2010
Saving a SharePoint 2010 site as a template allows you to clone it somewhere else. You can do this either without content (to create a brand new site with the same design) or with content (as one way of doing a site migration or backup).
How does this works?
1. Under “Site Actions”, select “Site Settings”.
2. Under “Site Actions”, you should see “Save Site as Template”. But sometimes it may not be there. You may see something like the below instead.
3. If you don’t have “Save Site as Template” as an option, it could be because you don’t have sufficient permissions (in which case you need to talk to your site administrator). But what if you are the administrator, and you still don’t see “Save Site as Template”? In this case, the problem may be that you need to turn off the site’s publishing features. (Note: if you are working with a sub site, the parent site will not be affected by this.)
3A. Go to Site Actions -> Site Settings -> Manage site features (under “Site Actions”)
3B. Click “Deactivate” for “SharePoint Server Publishing”
3C. Go back to Site Actions -> Site Settings. You should now see “Save site as template” as an option
4. Select “Save site as template”, and provide the required information. Decide whether you want to copy the site’s content with the template (see above). Click “OK”.
5. You will get a link to your “solution gallery”, which has your template.
6. If you need to find it later, the template is at <your root site URL>/_catalogs/solutions . Note that as with SharePoint 2007, the site template is stored at the root level (even if the site you are saving is a sub site). This means that you need to have permissions to the root site in order to complete this process.
7. If you want to clone the site to another location, first save it out, for instance to your desktop. Do this by
7A. Clicking on the name
7B. Clicking “Save” and selecting a location. For SharePoint 2010, it should save as a “.wsp” file. (“Resource Usage” of “0.00” does not mean that it is an empty file: you’re fine.)
8. If you now want to make the cloned site a sub site of another SharePoint 2010 installation, you first need to load it into the “Solution Gallery” in the target site.
8A. In the root site for the target installation, go to the “Solution Gallery”
8B. From the ribbon, select “Solutions” then “Upload Solution”
8C. Browse to the file. If you don’t see an “OK” button on the file browse window, click the “maximize” button in the upper right next to the “x”.
8D. Click OK
9. Check that the template now appears in the target installation’s Solution Gallery.
10. You can now create a new sub site using the template from Site Actions -> New Site
Here i just want to explain about ‘best bets’ functionality in this post.
Best bets essentially allows you to inject your chosen content at the top of search queries for certain keywords. As an example on my test bed site when ever someone types ‘javier’ I want to return three key items at the top. These three items will be:
link to my twitter feed link
link to my technical blog techgrowingpains.com
link to my Linkedin page
Now, this is an example, but you can use this in a variety of other situations. For example for your companies’ SharePoint search you can use a keyword like ‘payroll’ and have it return links to your payroll system, or information to your payroll submission forms. Create a Search Center
To leverage best bets we must use a search center. That is pretty easy. A search center in essence is a subsite of your site. Click on Site Actions->New Site->Search->Basic Search Center. Lets fill it our with the following information, and select create. Take a look at the more options button if you want to modify it from the default settings.
Great once you select create it puts into your search center. If we try and search for the term ‘javier’ we get results, but not our best bests. Lets navigate back to our parent site. Creating Best Bets
From here lets go back to our site settings. Remember this is our parent site and not the new site setting for the search center we just created. click Site Actions->Site Collection Administration->Search keywords->Add Keyword. I want my key word to be ‘javier’ but as we can see you can fill in synonyms as you need them. Optionally, you can add some type of definition to appear with the keyword result. In this case I’ll use ‘javi’ my nickname as a synonym.
Now that your key word is set lets create the actual best bets. Click on ‘Add Best Bet’.
Enter your information, and click OK. Let repeat that cycle to enter in the all the best bests we want, and in the order we want. If you take a look at the rest of the edit key word screen you will notice other options to add a contact and publishing options. Press OK when completed.
Lets test it out. I’ll navigate to your search center subsite and enter in my new keyword ‘javier’.
Great! now we have best bet set up and returning the information we want for our users. Almost complete but still not quite there… Completing the Configuration
Lets test the search from our parent site.
hmm… as we can see no best bets here. The key is the URL.
we need to link our parent site search bar to default to the new search center subsite. In the parent site click on site actions-> site settings-> search setings. Select ‘Enable custom scopes’ and fill in the appropraite link to your subsite. In my case that was ‘/sites/test/searchcenter’. I do not like to use full URL hard links because this offers the maximum versatility, and SharePoint is smart enough to add the appropriate completed link. In addition I chose, ‘Do not show scopes dropdown, and default to target results page’ under ‘specify the dropdown mode for Search Boxes:’. We will go over custom scopes later. click OK.
Now if we type in ‘javier’ from the parent’s search box it will return the proper results WITH the best bets.
Fantastic! Now, remember best bets is not available to SharePoint Foundation, but you can get it SharePoint 2010 Search Server Express, SharePoint 2010 Standard, and SharePoint 2010 Enterprise.
From your site home page, click "Site Actions/Site Settings/Modify All Site Settings".
Under Site Collection Administration, click "Search Keywords".
On the Manage Keywords page, click "Add Keyword".
On the Add Keyword page, click "Add Best Bet".
On the Add Best Bet popup page, enter the Target URL, Title and Description of the best bet and click "OK".
Back on the Add Keyword page, enter the Keyword Phrase, Synonyms (separated by a semi colon), Definition, Contact Person and Expiration Date and click "OK".
The new keyword and best bet should now be listed.
Testing by searching for "My Phrase" should yield the Best Bet. You can customize where Best Bets show up on the results page. In our example's case, it was set to be the first results in the list.
A search for any of the synonyms should yield the same result.
SharePoint 2010 supports disk-based BLOB Cache that controls the caching for binary large objects. If you configure BLOB for frequently used images, audio files, video files, java script files, css files etc., the performance will be improved. BLOB cache needs to be enabled in the front end web server and once configured; the configured files will be retrieved from the database and stored in a directory under Front end web server. This reduces the network traffic/load on the database server.
You need to carefully decide whether or not to use the BLOB cache. You need to carefully decide what files need to be placed under BLOB cache. For e.g. placing documents under BLOB cache in a collaboration portal will give you negative effect as the documents will be authored by users frequently.
Consider the following points for configuring the BLOB cache.
For a publishing site for which most of the visitors are anonymous or where most of the files are static content, enable the BLOB cache for as many file types as possible.
For other sites that contain lots of media assets that are read-only, or where only a small percentage of the media assets are updated, enable the BLOB cache for media files only.
Be noted that you can have only one BLOB cache per web application. Each web front end server will have its own copy of BLOB cache. In load balancing scenarios, each web server will have its own copies and the files will be added to the blob cache individually by the front end server when it serve the file for the first time.
The BLOB cache needs to specify in the web.config for each web application. By default, the BLOB caching is disabled. Open the web.config for the web application that you need to configure the BLOB cache. Normally you find the following line in the web.config of the web application.
<BlobCache location="<location>" path="<files to be cached>" maxSize="10" enabled="true" />
Modify the following attributes
location – the path to the directory where the blob files stores in the disk.
path – specifies the condition for file names that will be included in the cache. By default SharePoint will include a regular expression that matches certain extensions. In most of the cases you just need to add/remove some extentions to the list.
maxSize – the maximum size for the cache expressed in GB, 10 GB is the default
enabled - specifies whether blob cache is enabled or not. True indicates enabled
e.g.
<BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv)$" maxSize="10" enabled="true" />
Flush output cache
In some situations, you need to flush the output cache. You can do this by using the following PowerShell commands
$webApp = Get-SPWebApplication "<http://your web application url>"
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
Database migration of all the three upgrade techniques, my favorite is database migration. Database migration can be defined as “Requires the server administrator to install the new version on a separate farm or separate hardware, and then manually migrate the databases into the new environment.”
Database Migration enables moving to new farm or new hardware while SharePoint Portal Server 2003 environment is available and is untouched by upgrade. Microsoft says that database migration is a “Complex process that requires many manual steps and a higher risk of error. Requires additional manual steps to retain original URLs for sites. Search scopes must be re-created and search settings must be reapplied. Requires new server farm, and twice the amount of SQL Server storage space”. My advise is don’t be afraid and do try.
These steps are done for upgrade from WSS2.0/SharePoint 2003 to WSS3.0/MOSS 2007 in a single form environment. For different architecture, you may need some more steps. The steps are under:
·Get ready your MOSS 2007 environment.
·Run PreScan on SharePoint Portal Server 2003.
·Set the content database of SharePoint Portal Server 2003 as read only.
·Take back up of content database of SharePoint Portal Server 2003.
·Restore back up on SQL Server attached with MOSS 2007.
·Create web application in MOSS 2007.
·Remove content database of the newly created web application in MOSS 2007.
·Attach restore database with the newly created web application in MOSS 2007.
And that’s itJ.
I am not going into the details of creating MOSS 2007 environment. We will start from the second step:
Run PreScan on SharePoint Portal Server 2003:
The first step is to run PreScan.exe. For details kindly visit the following blog:
Let the name of the back be “Portal_Site.bak”. Wait after this. The time of database backup depends upon the system power and database size.
Restore back up on SQL Server attached with MOSS 2007:
The first step in restoring database is to create a database in SQL Server 2005. Let the newly created database name is “Portal_Site_Restore”.
1. Expand Database “Portal_Site_Restore”, right-click the database you want to restore, point to Tasks, point to Restore, and then click Database. The Restore Database dialog box appears.
2. On the General page, the name of the restoring database appears in the To database list box.
3. In the To a point in time text box (if using SQL Server 2005 Enterprise Edition), retain the default (Most recent possible).
4. To specify the source and location of the backup sets to restore, click From device, and then specify the database backup path (in our case, it is “Portal_Site.bak”) in the list box.
5. In the Select the backup sets to restore grid, select the backup path.
6. From the options tab, select “overwrite existing database”.
7. Specify the paths for .ldf and .mdf in the options tab.
8. Click OK to start the restore process.
Wait after this. The time of restoring database depends upon the system power and database size.
Create web application in MOSS 2007
In the SharePoint Central Administration, move to “Application Management” and click on “Create or extend Web application” under “SharePoint Web Application Management”.
Again click on “Create Web application”. Set the settings according to your own needs (do check the name of the web application and content database. Let the name of the web application be “http://servername:1234” and the name of the content database be “WSS_Content_1234”) and click OK. Don’t create any site collection.
Remove content database of the newly created web application in MOSS 2007
We can do that using Central Administrator or stsadm utility. I will like to do that using stsadm. Central Administration is easy. You will be able to learn that if you know how to do it using stsadm.
The command for removing content database using stsadm is ‘deletecontentdb’. The description is as under:
Attach restore database with the newly created web application in MOSS 2007
We can do that using Central Administrator or stsadm utility. I will like to do that using stsadm. Central Administration is easy. You will be able to learn that if you know how to do it using stsadm.
The command for removing content database using stsadm is ‘addcontentdb’. The description is as under:
---------------------------------------------------------------------------------
WFE Role hosts sharepoint site and handle user requests,
Database Role hosts and manage Sharepoint databases,
Application Role can host some services like Excel, Forms ...etc
----------------------------------------------------------------------------------
WFE /Web Front end server serves the web sites to the users. These servers hosts the IIS applications and servers the pages.
Application Server is a server provisioned for serving applications like Infopath forms services, Excel services etc
Database server is the Server having Microsoft SQL server installed and holds the databases for sharepoint. The Web Front end Server is the server that is hosting IIS and serves the websites.
An Application Server has services on it, for example, like Excel services, Project server, etc..
A database server simply hosts the SharePoint core db's and the other Content databases.. It just has SQL Server installation on it.
So you have to install Sharepoint to WFE's and App. Servers.. You dont need to install Sharepoint to the database servers on your farms.