Showing posts with label SharePoint 2010. Show all posts
Showing posts with label SharePoint 2010. Show all posts

Thursday, 20 February 2014

patterns & practices SharePoint Guidance

patterns & practices SharePoint Guidance​
 
 
Error Logging in SharePoint
http://spmatt.wordpress.com/tag/sharepoint-guidance-library/

SharePoint 2013 development overview



http://msdn.microsoft.com/en-us/library/ff798413.aspx


Put the JavaScript or XAP files in a SharePoint library, and enable binary large object (BLOB) caching. BLOB caching instructs SharePoint to cache BLOB content, such as JavaScript and XAP files, on the SharePoint Web front-end servers. It also enables client browsers to cache the content. If BLOB caching is not enabled, the HTTP header that returns the JavaScript or XAP resources to the client will instruct the browser not to cache the files. It does this by including a cache-control: private directive and by setting an expiration time in the past. As a result, neither the client browser nor the web front-end server will cache the content, which instead will be retrieved from the content database on every request. BLOB caching is a SharePoint Server 2010 feature and must be enabled in the configuration files for the SharePoint web applications, so to some degree you are at the mercy of the farm administrator. For more information on BLOB caching, see Disk-Based Caching for Binary Large Objects.
http://msdn.microsoft.com/en-us/library/aa604896.aspx 

REST in SP2010



SHAREPOINT GUIDANCE FOR SHAREPOINT 2013
http://graegert.de/blog/sharepoint-guidance-for-sharepoint-2013/ 

Sunday, 23 June 2013

Site Collection Backup & Restore by Powershell

Backup-SPSite

Backup-SPSite -Identity SiteCollectionURLHere -Path BackupFilePathHere [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose]
  • Identity - Specifies the URL or GUID of the site collection to be backed up.
  • For example, a valid URL, such as http://server_name/sites/site_name or a GUID such as, "01234567-89ab-cdef-0123-456789abcdef"
  • Path - Specifies the full path to the backup file (that is, C:\Backup\site_name.bak)
  • Force - Specify to overwrite an existing backup file if it already exists.
  • NoSiteLock - Specifies the site collection to remain read and write during the backup.
  • If the NoSiteLock parameter is not specified, then a site collection that has a site collection lock setting of "none" or "no additions" will be temporarily set to "read only" while the site collection backup is performed. Once the backup has completed, the site collection lock will return to its original state. The backup package will record the original site collection lock state so that it is restored to that state.
    If users are writing to the site collection while the site collection is being backed up, then the NoSiteLockparameter is not recommended for potential impact to backup integrity, it means if someone changes content on the site while the backup is being created and according to Microsoft “might lead to possible data corruption”
  • UseSqlSnapshot - Specifies a SQL Database Snapshot will be created when the backup begins, and all site collection data will be retrieved directly from the database snapshot, this snapshot will be deleted automatically when the backup completes.
  • The UseSqlSnapshot parameter is recommended if the database server hosting your content database supports database snapshots such as SQL Server Enterprise Edition and SQL Server Developer Edition. This is because it will ensure a valid backup while allowing users to continue reading and writing to the site collection during the backup. It is not necessary to specify the NoSiteLock parameter when specifying the UseSqlSnapshot parameter.
  • NoSiteLock - Specifies the URL or GUID of the site collection to be backed up.

Example

Backup-SPSite http://server_name/sites/site_name -Path C:\Backup\site_name.bak
Get-SPSiteAdministration http://server_name/sites/site_name Backup-SPSite -Path C:\Backup\site_name.bak
Backup-SPSite http://server_name/sites/site_name -Path C:\Backup\site_name.bak -UseSqlSnapshot

Restore-SPSite

Restore-SPSite -Identity SiteCollectionURLHere -Path BackupFilePathHere [-ContentDatabase ContentDatabaseNameHere] [-Force] [-GradualDelete] [-HostHeaderWebApplication HostHeaderHere]
  • ContentDatabase - Specifies the SQL Server content database where the site collection data will be stored. If no content database is specified, the content database with the greatest unused site collection capacity and whose database status is ready will be used.
  • Force - Specifies that the existing site collection at the URL location is to be overwritten by this restoration.
  • GradualDelete - Specifies that the site collection being overwritten with the Force parameter should be gradually deleted over time by a timer job instead of all at once, which reduces its impact on SharePoint 2010 Products and SQL Server performance. This option is recommended for large site collections.
  • HostHeaderWebApplication - A valid URL assigned to the Web application by using alternate access mapping, such as http://server_name.
  • Restores a site collection as a host-named site collection instead of a path-based site collection. When the HostHeaderWebApplication parameter is present, the value of the Identity parameter is the URL of the host-named site collection and the value of the HostHeaderWebApplication parameter is the URL of the Web application that will hold the host-named site collection
Restore-SPSite -Identity SiteCollectionURLHere -Path BackupFilePathHere [-DatabaseServer DatabaseServerNameHere] [-DatabaseName ContentDatabaseNameHere] [-HostHeaderWebApplication HostHeaderHere] [-Force] [-GradualDelete] [-Verbose]
  • DatabaseServer - Specifies the name of the SQL Server containing the content database specified by the DatabaseName parameter.
  • The type must be a valid database server name, in the form SQLBE1 and needs to be used in conjunction with the DatabaseName parameter.
  • DatabaseName - Specifies the SQL Server content database where the site collection data will be stored.
  • If no content database is specified, the content database with the greatest unused site collection capacity and whose database status is ready will be used. The type must be a valid database name, in the form SQLDB1.
  • Force - Specifies that the existing site collection at the URL location is to be overwritten by this restoration.
  • GradualDelete - Specifies that the site collection being overwritten with the Force parameter should be gradually deleted over time by a timer job instead of all at once, which reduces its impact on SharePoint 2010 Products and SQL Server performance. This option is recommended for large site collections.
  • HostHeaderWebApplication - A valid URL assigned to the Web application by using alternate access mapping, such as http://server_name.
  • Restores a site collection as a host-named site collection instead of a path-based site collection. When the HostHeaderWebApplication parameter is present, the value of the Identity parameter is the URL of the host-named site collection and the value of the HostHeaderWebApplication parameter is the URL of the Web application that will hold the host-named site collection

Example

Restore-SPSite http://server_name/sites/site_name -Path C:\Backup\site_name.bak
Restore-SPSite http://server_name/sites/site_name -Path C:\Backup\site_name.bak
Restore-SPSite http://www.example.com -Path \\file_server\share\site_name.bak -HostHeaderWebApplication http://server_name