Project Description
GEPBACKUP is a SharePoint 2010 and 2013 utility that creates a Powershell script based on the changes in the site.

The command line looks like this:

SharePoint 2010 Version:
GEPBACKUP2010 -u URL of site to check -d -w -a -l //BackupDirectoryShare -s PowerShellScriptFile -[f/x/w BackupReportFile]

SharePoint 2013 Version:
GEPBACKUP2013 -u URL of site to check -d -w -a -l //BackupDirectoryShare -s PowerShellScriptFile -[f/x/w BackupReportFile]

Ok, lets go through the switches in turn:

-u
This is the URL of the site. Use this if you wish to target a specific site to backup instead of everything (i.e. all sites). If you do not use this switch all web applications and site collections will be included (i.e. will be checked)

-d
When this switch is used only sites whose content has been changed will be included in the backup. Note that as detailed in the previous, switch, if -u is not used all sites will be checked against this switch.

-w
When this switch is used only sites whose content has been checked in the week will be includd in the backup. Note that as detailed in the previous, switch, if -w is not used all sites will be checked against this switch.

-a
When this switch is used all sites will be included in the backup and will not be subject to a date comparison check - i.e. any last content date change will be ignored.

-l
When this switch is used backups will be stored in the relevant share or the drive / folder. This application makes no check to identify whether the target is valid; however, if nothing is entered as the directory then an error will be thrown and the utility will not proceed.

-s
When this switch is used the script will be generated in the relevant PowerShell backup filename submitted. If no Powershell script filename is entered and this switch is used an error will be thrown and the utility will not proceed.

-f / -x / -w
When any of these switches are used the output report file will be generated to either -f for Text File, -x for XML and -w for HTML format. Note that if there is no filename supplied with this switch an error will be thrown and the utility will not proceed.

Special note.
GEPBackup2010 and GEPBackup2013 has the ability to ignore specific sites. All you need to do is to list the sites URL you don't want backed up in a file called EXCLUSIONS.TXT stored in the same directory. When running the routine will check for the existence of EXCLUSIONS.TXT and if found will then check each URL being scanned against the URLS in EXCLUSIONS.TXT. If there is a match the URL being scanned will not be backed up.
This is very useful if you want to backup sites in a site collection but not all of them.

-h
If you use this switch the help screen will be displayed as above, and the help screen also displays if you run the routine without using any switches.

Examples of this command being used is as follows (based on the 2010 version but the descriptions are the same throughout):

GEPBACKUP2010 -d
This will create a Powershell backup script called GEPBACKUP2010.ps1 including commands to backup each site whose content has been changed today. The output report will be called GEPBACKUP2010.txt and the backup files created by the script will be stored in the same directory it was run in.

GEPBACKUP2010 -a -f mybackups.txt -l e:\backups -s mybackupscript.ps1
This will create a Powershell backup script called mybackupscript.ps1 including commands to backup each site whose content has been changed today. The report output will be sent to mybackups.txt and the backups created by the script will be stored in the directory called e:\backups.

GEPBACKUP2010 -u http://myspsportal -d -f mybackups.txt -l e:\backups -s mybackupscript.ps1
This will create a Powershell backup script called mybackupscript.ps1 including commands to backup each sites from the web application http://myspsportal whose content has been changed today. The report output will be sent to mybackups.txt and the backups created by the script will be stored in the directory called called e:\backups.

DONATIONS GRATEFULLY RECEIVED!
Am trying to build a great bunch of tools for Sharepoint automation - if you like this tool please donate something - it all goes to keeping me toiling away on those apps and makes me feel its all worthwhile! Please donate by going here: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6205083 and clicking the DONATE button - thanks!

More information about GEPBackup2010 and my other automation tools are located at http://www.sharepointgeoff.com/software

Last edited Apr 8, 2013 at 1:48 PM by GeoffE, version 6