Hello Community,
After many time of abscense I'm back to continue providing you with more information that can be valuable or useful, this time for SharePoint 2010 beginners that would like to know the new OOB Backup/Restore features and how to schedule backups using Windows scheduled tasks.
First we need to know and understand SharePoint Central Administration site options
As we can see on the image above we have 2 categories "Farm Backup and Restore" & "Granular Backup".
Here we have granular backup options now. SharePoint 2010 includes export/import options that was only available through stsadm in MOSS 2007, in order SharePoint administrator can execute a backup of a site, list or document library without PowerShell:
3. Finally a shortcut to review the status of the granular backup
Using Windows Scheduled Tasks
Having scheduled backups are fundamental for SharePoint adminsitrators, most of the times this taks are executed overnight, first of all, to grant data integrity and get the last updated data ,and then to minimize performance impact because of the heavy I/O on disks
In this section you will find some examples with the correct syntaxis for PowerShell scripts, but first we need to build a .BAT file like this one
@echo on
SET SOURCE_SITE=<URL>SET DEST=<Path>
powershell -command <PS1 File> %SOURCE_SITE% %DEST%echo “Backup completed successfully at %DEST%” on %DATE% %TIME% >> <LogFileCustom>
Where:
<URL> Will be the Site Collection to be backed up
<Path> Path for the backup file. Drive:\backupintranet\backupintranet.bak
<LogFileCustom> Log file(Optional) Drive:\backupintranet\backupLog.txt
<PS1 File> PowerShell script location Drive:\backupintranet\Bckptl.ps1
But, what's inside PS1 file?, we have many options. Before we need to understand that SharePoint Central Administration site only allows us to make backups of the entire farm or at web application level only, but not for a specific site collection or site, we need to highlight that SharePoint administrator will be able to restore SharePoint objects as fast as possible, rather than restoring the entire content inside the content database that can be 200 GB of size and taking hours to be restored.
Well PS1 file MUST start with the following line in order to start PowerShell
Add-PsSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
What we have for backups:
Site Collections:
Backup-SPSite -Identity <Site collection name> -Path <backup file> [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose] (http://technet.microsoft.com/en-us/library/ee748617.aspx)
Sites, Lists or Document Libraries
Export-SPWeb -Identity <Site URL> -Path <Path and file name> [-ItemUrl <URL of site, list, or library>] [-IncludeUserSecurity] [-IncludeVersions] [-NoFileCompression] [-GradualDelete] [-Verbose] (http://technet.microsoft.com/en-us/library/ee428301.aspx)
Farm configuration
Backup-SPConfigurationDatabase -Directory <BackupFolder> -DatabaseServer <DatabaseServerName> -DatabaseName <DatabaseName> -DatabaseCredentials <WindowsPowerShellCredentialObject> [-Verbose] (http://technet.microsoft.com/en-us/library/ee428320.aspx)
This last option is a new feature in SharePoint 2010 that allows SharePoint administrator to backup farm CONFIGURATION located in Configuration database, the objective is to restore some configuration settings in a different Configuration database like a DRP SharePoint farm (Disaster Recovery Plan)
If you want to know more backup/restore options and some PowerShell sample scripts for SharePoint 2010 you can check the following technet article:
http://technet.microsoft.com/en-us/library/ee428315.aspx
See you soon...!!!
Hola comunidad,
Después de mucho tiempo regresamos a continuar con información que puede ser valiosa para ustedes, en esta ocasión para los principiantes de SharePoint 2010 que desean saber las opciones de Respaldo y Restauración que SharePoint 2010 tiene out-of-the-box y como usar las tareas programadas de Windows para calendarizar respaldos.
Primero entendamos las opciones que tenemos desde la Administración Central de SharePoint
Como podemos observar en la imagen anterior tenemos 2 categorias "Respaldo y Restauración de la granja" y "Respaldo Granular".
Después tenemos las opciones para los respaldos granulares. SharePoint 2010 integra estas opciones que solo estaban disponibles a traves de stsadm en la versión anterior, para que el administrador de la granja de SharePoint pueda en un momento dado ejecutar un respaldo de una lista o biblioteca de documentos sin tener que usar PowerShell:
3. Y finalmente un acceso directo a revisar el estado del respaldo granular
Usando las tareas programadas de Windows
La calendarización de los respaldos será siempre una función fundamental pues la mayoría de los administradores de sistemas programa estas actividades durante la noche, en primer lugar por el impacto que puede existir en los datos a respaldar ya sea para mantener la integridad o para tener en el respaldo la mayor actualización de la información y por otro lado para no afectar el desempeño de las aplicaciónes debido al alto I/O que un respaldo conlleva.
Esta sección tiene la intención de proveer de algunos ejemplos con la sintaxis apropiada para que cada administrador de SharePoint calendarice sus respaldos.
Primero es necesario saber que requeriremos de un archivo .bat para la ejecución del respaldo desde PowerShell, por ejemplo:
@echo onSET SOURCE_SITE=<URL>http://intranetSET DEST=<Path>echo “backup Started at” %DATE% %TIME% >> <LogFileCustom>
powershell -command <PS1 File> %SOURCE_SITE% %DEST%echo “Backup completed successfully at %DEST%” on %DATE% %TIME% >> <LogFileCustom>@echo on
Donde:
<URL> Será la Colección de sitios a respaldar
<Path> La ubicación completa incluyendo el nombre del archivo donde se creará el respaldo. Ej.: Drive:\backupintranet\backupintranet.bak
<LogFileCustom> El archivo de log de los respaldos (Opcional) Ej.: Drive:\backupintranet\backupLog.txt
<PS1 File> La ubicación del script de PowerShell que será ejecutado para el respaldo. Ej.: Drive:\backupintranet\Bckptl.ps1
Ahora bien que deberá incluir el archivo PS1?, bien pues tenemos varias opciones. De inicio debemos de tomar en cuenta que las opciones del sitio de Administración Central de SharePoint nos permite hacer respaldos a nivel de toda la granja o de aplicación web, pero no de una colección de sitios en particular, siendo importante destacar que haciendo esta clase de respaldos el administrador de SharePoint tendrá la capacidad de restaurar información imporntate en menor tiempo que si lo hiciera restaurando toda la base de datos de contenido, pues ésta podría llegar a medir hasta 200 GB, lo que implicarían horas en una restauración.
Bien pues el archivo PS1 deberá iniciar con la siguiente línea que permitirá ejecutar la llamada de PowerShell
Ahora si las opciones para respaldos:
Colecciones de Sitios:
Sitios, Listas o Bibliotecas de documentos
Configuración de la granja
Esta última es una nueva característica que permitirá respaldar cierta configuración almacenada en la base de datos de Configuración de SharePoint, con el objetivo de restaurar dicha configuración en una nueva base de datos de configuración en una nueva granja de SharePoint y reducir el tiempo de creación de una nueva granja, por ejemplo en el caso de granjas para DRP (Disaster Recovery Plan)
Si desean conocer más opciones y ejemplos de scripts de PowerShell para los diferentes objetos de SharePoint 2010 pueden consultar el siguiente contenido:
Hasta la próxima...!!!