Showing posts with label backup restore in sharepoint 2010. Show all posts
Showing posts with label backup restore in sharepoint 2010. Show all posts

20 August, 2012

SharePoint 2010 Service Applications

SharePoint 2010 includes a fundamental architectural change from the previous version with the introduction of “Service Applications”. This new architecture has extremely broad and deep consequences for SharePoint practitioners. Unfortunately Service Applications thus far have been poorly explained and documented, and already there are many myths surrounding them. This “In a Nutshell” article is an attempt to distil the core elements down to brass tacks. It is intended primarily for architects and administrators planning their farm topologies, but will also be useful for anyone working with SharePoint 2010.


Introduction.


SharePoint 2010 includes a fundamental architectural change from the previous version with the introduction of “Service Applications”. This new architecture has extremely broad and deep consequences for SharePoint practitioners, touching on nearly every aspect of SharePoint implementation from development approaches, topology design, service federation, authentication, governance and operational service management. Service Applications, rather than any particular service or feature in SharePoint 2010, is the single most important area for the field to adequately understand. At the very least service applications represent a fundamental change to the functional decomposition of services within a farm, the single biggest factor in delivering platform hygiene for distributed application platforms. Unfortunately service applications thus far have been very poorly explained and documented. There are already, just a few weeks after RTM, many myths around service applications. You’ve probably heard them. A couple of my favourites are “Service applications give you scalability and load balancing for free” and “Service applications avoid authentication delegation problems”, which of course are both total hogwash.


This “In a Nutshell” article is an attempt to distil the core elements of service applications down to brass tacks. I will not be covering any particular service application in detail but rather focus on the core infrastructure plumbing. It is intended primarily for architects and administrators planning their farm topologies, but will also be useful for anyone working with SharePoint 2010.


Benefits (and drawbacks) of the Service Applications model.


The service applications model addresses some key limitations with the “old” Shared Service Provider (SSP) model in SharePoint 2007. First and foremost service applications allow for truly flexible deployment and granular delegation of control. You will have seen this referred to as “Services a-la-carte” – a particularly heinous marketing phrase. Service Federation is also now greatly refined because of amongst other things the adoption of Claims Based Identity in SharePoint 2010. Service applications also enable multi-tenant scenarios. We can also have true service isolation and each service application can now be autonomous in terms of it’s external resources such as configuration and data stores.


All very nice things, and all very much needed. But hold on a second, you have to take this stuff with a pinch of salt. It’s early days. Think back to the release of SharePoint Server 2007. Shared Service Providers (SSPs) were the solution to the scaling issues inherent in SharePoint Portal Server 2003 and a bunch of other things. They were wonderful! Now we are being told that they sucked, and service applications are the solution!


Having said that there can be no doubt that the service application model provides a suitable approach to addressing the scalability and delegation issues with SSPs and also are a fundamental enabler for a much wider feature capability (think Managed Metadata, Office Web Apps) in SharePoint 2010. Indeed the service application model pushes Microsoft’s most “service orientated” product vastly further ahead in the realm of distributed application platform hygiene. And that’s not a little deal at all. The service application model allows SharePoint 2010 to scale further than ever before, way further. It also introduces a flexibility with respect to deployment that is unmatched in the marketplace. Just what big ass enterprises and SharePoint Online needs. Great!


But wait a minute! Enterprise software is about one thing, compromise. With all that goodness comes a fair dollop of complexity. Think of all those messed up SharePoint 2007 farms, “medium” ones, “large” ones, it doesn’t matter, I’ve never once done a health check and not had to identify farm topology issues. Whacky topologies are a very common thing, and they will get more common with SharePoint 2010. Aside from poor SQL Server implementation and insecure platform configuration, dodgy topologies are perhaps the most common reason for failed deployments or poor performance in production.


Therefore it is more important than ever to fully understand the functional decomposition of SharePoint. How can one choose the appropriate deployment topology if you don’t know which bits do what?


What is a Service Application?


Service Applications are actually nothing more than a logical concept. There is actually no such thing as a “Service Application”. The term is chucked around all over the shop and is destined to become as ubiquitous and misleading as “Web Front End”. You can’t just blame marketing. In the lead up to RTM, many SharePoint “experts” have been playing buzzword bingo with the term and giving false information about them, and even more worryingly, how to build them.


Of course SharePoint wouldn’t be SharePoint if it didn’t have totally confusing administrative interfaces and inconsistency in terminology. Central Administration (a.k.a. SharePoint Control Panel :)) is perhaps the worst culprit here. The bottom line is forget about “Service Applications” other than as a term to describe the model of deployment for shared services in SharePoint 2010. Again, it’s a logical concept or container, nothing more.


There are a number of components within a “Service Application”. They are


Service Instance, This is the meat of the thing, it’s the implementation of the functionality provided. Application binaries. It could include Windows Services, configuration, registry settings etc. SharePoint assets could include timer jobs, services, management pages etc. These bits are deployed to every server in the farm when the install is performed. When PSConfig(UI).exe is run you will see the status: “Successfully installed Service Instance: name of service”. Different service applications of course will have a different variety of bits.


Service Machine Instance, This is the machine or machines in the farm that run the “service”. It is often referred to as a “SharePoint Service”. You configure this using Services on Server. More than one machine can run the Service Machine Instance and by default, software round robin load balancing is provided. You do not need to implement Network Load Balancing of any incarnation. Certain services will also provide their own software load balancing scheme (e.g. Excel Calculation Services). Not all service applications have an associated service machine instance. Some service machine instances can only be started on one server in the farm unless there are multiple service applications.


Some Service Machine Instances have additional configuration. Some “legacy” service machine instances exist, such as the Document Conversions Services, for which there is not an associated Service Application. In addition services such as the Claims to Windows Token Service and the Sandbox Code Service are just SharePoint wrappers for a Windows Service.


Service Application Endpoint, When you start a service machine instance for which there is an associated Service Application, an IIS Virtual Application will be created within the SharePoint Web Services IIS Web site. This will include the Service Application Endpoint (a WCF or ASMX). Each service application must expose a service application endpoint. The service application endpoint is only created on the machine(s) hosting the service machine instance.


Service Application, This is the logical container of the service, what is exposed through Manage Service Applications. It includes the management aspects of the service and configuration. When created the associated databases (if any) and configuration will also be created. The service application endpoint is not created until an associated service machine instance is started. There can be more than one instance of a particular service application. Pages for managing the Service Application are hosted in Central Administration and are called using a GUID in the query string. Service Applications are global to the farm.


Service Connection (aka Service Application Proxy) This is a virtual link between consumers (e.g. Web Applications) and the service. This is an interface for consuming applications and services that understands the load balancing scheme for a service and how to speak to the service machine instance(s). This is not a WCF proxy. The Service Connection also enables inter-farm services. Some Service Connections include settings which are specific to a given connection. The UI calls them Service Connections, but they are more commonly known as Service Application proxies – the term used by PowerShell.


Consumers, are any component that uses the service. Examples include Web Applications, a page, another service application, etc. All the consumer needs is a reference to the service connection.


How do we set these things up? Not all service applications are equal. This is SharePoint after all


“Core” Service applications which are provisioned by PSConfig(UI).exe: Topology and STS, for which there is no or little configuration.


“General Purpose” Service applications for which no associated service machine instance is exposed for configuration, such as the State Service.


“Simple” Service applications that have relatively little configuration or moving parts, for example the Access Database Service or the Subscription Settings Service.


“Medium” Service applications that have a relatively small amount of moving parts, such as the Managed Metadata Service.


“Complex” Service applications that have a relatively complex amount of configuration and moving parts, such as SharePoint Server Search Service or User Profile Service (which have multiple Service Machine Instances).


Not all service applications are created, configured or managed in the same way. There is a ways to go in striving for this consistency and in some cases it is not prudent anyway.


As a general recommendation, the order of creation should be:


- Create the Service Application and Proxy


- Configure the Service Machine Instance In some cases this order is enforced, in others it doesn’t matter.


If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues. Thank you.


In Next Artcile I will try to publish the list of SharePoint 2010 Service Applications and thier use.

14 August, 2012

Restore a Web application in SharePoint Server 2010 using Windows PowerShell

You can use Windows PowerShell to restore a Web application manually or as part of a script that can be run at scheduled intervals.

To restore a Web application by using Windows PowerShell
1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint 2010 Products.
3. Click SharePoint 2010 Management Shell.
4. At the Windows PowerShell command prompt, type the following command:
Restore-SPFarm -Directory (BackupFolderName) -RestoreMethod Overwrite -Item (WebApplicationName) [-BackupId (GUID)] [-Verbose]

Where:
- BackupFolderName, is the full path to the folder you use for backup files.
- WebApplicationNam, is the name of the Web application that was backed up.
- GUID, is the identifier of the back up to use for the restore operation.

If you do not specify the value of the BackupID parameter, the most recent backup will be used. You cannot restore a Web application by using a configuration-only backup. You can view the backups for the farm by typing the following:
Get-SPBackupHistory -Directory -ShowBackup

04 August, 2012

This document was checked out to your local drafts folder, but the local copy could not be checked in to the site, close any application that is editing the document and try to check in again, or discard the checkout


Problem Description:
Unable to check in large excel file ( 80 mb ) in document library http://amol.sharepoint.com/sites/. The operation fails with the following error:

"This document was checked out to your local drafts folder, but the local copy could not be checked in to the site, close any application that is editing the document and try to check in again, or discard the checkout."

The same behavior is observed on other site collections as well.

Probable cause:
Missing Office Filter packs 

Resolution:
Install the Office Filter Pack 2.0 which can be downloaded from:

Microsoft Office 2010 Filter Packs

The Microsoft Filter Pack is a single point-of-distribution for Office IFilters. IFilters are components that allow search services to index content of specific file types, letting you search for content in those files. They are intended for use with Microsoft Search Services (Sharepoint, SQL, Exchange, Windows Search).

Install this product if you want to search for content in the file types listed below.

The Filter Pack includes:

Legacy Office Filter (97-2003; .doc, .ppt, .xls)
Metro Office Filter (2007; .docx, .pptx, .xlsx)
Zip Filter
OneNote filter
Visio Filter
Publisher Filter
Open Document Format Filter

Please let me know in case of any queries/questions.
I would be more than happy to help you as well as resolves your issues, Thank you

08 June, 2012

SharePoint 2010: Backup/Restore with PowerShell Command

This article is in continuation with the backup operations thread and you can get the reference from here:
http://sharepointknowledgebase.blogspot.com/2012/06/backup-restore-in-sharepoint-2010.html

Restore Operations
Restore operations are associated with:
·         Site collection
·         Subsite
·         List and Document Libraries
Restore of the site collection
By using Powershell
Name: Restore-SPSite
Synopsis: Restores a site collection.
Syntax:  Restore-SPSite [-Identity] <String> -Path <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-ContentDatabase <SPContentDatabasePipeBind>] [-Force <SwitchParameter>] [-GradualDelete <SwitchParameter>] [-HostHeaderWebApplication <String>] [-WhatIf [<SwitchParameter>]] [<C
    ommonParameters>]
Description: The Restore-SPSite cmdlet performs a restoration of the site collection to a location specified by the Identity parameter. A content database may only contain one copy of a site collection. If a site collection is backed up and restored to a different URL location within the same Web application, an additional content database must be available to hold the restored copy of the site collection.
Example:
C:\PS>Restore-SPSite http://server_name/sites/site_name -Path C:\Backup\site_name.bak
This example restores a site collection from the backup file C:\Backup\site_name.bak to the site collection URL http://server_name/sites/site_name.
By using STSADM command:
For site collection restore:
    stsadm.exe -o restore
           -URL <URL>
           -filename <filename>
           [-overwrite]

How to restore the subsite
By using Powershell
Name: Import-SPWeb
Synopsis: Imports a site collection, Web application, list, or library.
Syntax: Import-SPWeb [-Identity] <SPWebPipeBind> -Path <String> [-ActivateSolutions <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-HaltOnError <SwitchParameter>] [-HaltOnWarning <SwitchParameter>] [-IncludeUserCustomAction <None | All>] [-IncludeUserSecurity <SwitchParameter>] [-NoFileCompression <SwitchParameter>] [-NoLogFile <SwitchParameter>] [-UpdateVersions <Append | Overwrite | Ignore>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Description: The Import-SPWeb cmdlet imports a site collection, Web application, list, or library. The capability to import from a library is a new feature in SharePoint 2010 Products.
Example: C:\PS>Import-SPWeb http://site -Path export.cmp -UpdateVersions –Overwrite
This example imports the contents of export.cmp into a site at http://site, overwriting the versioned content on the site with the contents of the export.cmp file.
By using STSADM command:
stsadm.exe -o import
           -URL <URL to import to>
           -filename <import file name>
           [-includeusersecurity]

How to Restore the List/Document Libraries
By using Powershell
Export-SPWeb –Identity <site URL> -Path <Filename> -Includeusersecurity
If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issuesJ J
Thank you.

07 June, 2012

Backup Restore in SharePoint 2010

Hello Guys, today I am going to share one of my interesting topics in SharePoint 2010. This is an important one that you have to be ‘aware of’ as it belongs to recovery model. Yes, you are absolutely right; I am talking about Backup-Restore methods in SharePoint 2010.
Microsoft SharePoint 2010 has comes up with so many enhancements and backup restore is one of them. I will try my best here to cover the backup-restore based on GUI (Graphical User Interface), STSADM and Powershell so that you will be proficient enough to work on these mentioned methods independently.
Backup Operations
Backup operations are associated with:
·         Site collection
·         Subsite
·         List and Document Libraries
How to take the backup of the site collection:
By using Central Administration
·         Open the central administration
·         Backup and Restore
·         Granular Backup
·         Perform a site collection backup
·         Select the appropriate web application and site collection from the dropdown
·         Provide the filename
·         Start backup
·         You will be redirected to _admin/sitebackuporexportstatus.aspx
·         It shows the status ‘Operation initializing’
·         It will take some time to complete the backup depending on the size of the site collection
·         As soon as the backup completed then the status will change to ‘Operation Succeeded’
·         That’s it and you are done... check the file location and you will see the backup file that you have specified in the above mentioned steps.
By using STSADM command
For site collection backup:
    stsadm.exe -o backup -URL <URL> -filename <filename> [-overwrite]
By using Powershell command
Backup-SPSite -Identity http://SharePointBackuptesting/sites/AMOL2010 -Path <Filename>
How to take the backup of the subsite
By using Central Administration
§  Open the central administration
§  Backup and restore
§  Granular backup
§  Export a site or list
§  Select the appropriate web application, site collection and subsite
§  Provide the filename
§  Select Export Security (If you want to include permissions)
§  Export Versions (by default ‘All Versions’ selected)
§  Start backup
§  You will be redirected to _admin/sitebackuporexportstatus.aspx
§  It will take some time to complete the backup depending on the size of the site collection
§  As soon as the backup completed then the status will change to ‘Operation Succeeded’
§  That’s it and you are done... check the file location and you will see the backup file that you have specified in the above mentioned steps.
By using STSADM command
stsadm.exe -o export -URL <URL to be exported> -filename <export file name>
By using Powershell command
Export-SPWeb -Identity <URL of the subsite> -Path <filename> -IncludeUserSecurity
How to take the backup of the List/Document Library
By using Central Administration
·         Open the central administration
·         Backup and restore
·         Granular backup
·         Export a site or list
·         Select the appropriate web application, site collection and List/Document Library.
·         Provide the filename
·         Select Export Security (If you want to include permissions)
·         Export Versions (by default ‘All Versions’ selected)
·         Start backup
·         You will be redirected to _admin/sitebackuporexportstatus.aspx
·         It will take some time to complete the backup depending on the size of the site collection
·         As soon as the backup completed then the status will change to ‘Operation Succeeded’
·         That’s it and you are done... check the file location and you will see the backup file that you have specified in the above mentioned steps.
By using Powershell command
Export-SPWeb –Identity <Site URL> -Path <Filename> -ItemURL “Lists/Tasks” –includeusersecurity
If you face any queries/questions regarding the above mentioned information then please let me know…I would be more than happy to help you as well as resolves your issues, Thank you.
Note: Complete Restore Operations will be posted in the next article... so stay tuned…very soon I will provide you the restore information that will be the concluding part of this recovery operations.

Examples:
Backup of the List:

PS C:\> Export-SPWeb -Identity http://itweb.contoso.com/sites/SP2010_Backup/dspace -Path C:\SP2010_Backups\documentbkps.cmp -ItemUrl "Lists/Calendar"

Additional notes:


Filename: SP2010_Backups\documentbkps.cmp

Item URL means the name of the list that you wanna backup (here the name of the list is 'Calendar')

Note: if your list name contain spaces then you need to use double quotes, otherwise the Windows PowerShell command will return errors.

Backup of the document library:
PS C:\> Export-SPWeb -Identity http://itweb.contoso.com/sites/SP2010_Backup/dspace -Path C:\SP2010_Backups\testlibbkp2s.cmp -ItemUrl test -Force

Additional notes:


Filename: SP2010_Backups\testlibbkp2s.cmp

Item URL means the name of the library that you wanna backup (here the name of the library is 'test')

For restore operations, please refer http://sharepointknowledgebase.blogspot.in/2012/06/sharepoint-2010-backuprestore-with.html