Script not switching to differential backup because of space?

Apr 5, 2013 at 1:02 AM
Hi there,

Love the script, does the farm backups perfectly.

What I'm having issues with is the differential part. I've configured params.xml with the following -
    <backupwebconfigonly>FALSE</backupwebconfigonly> <!-- IMPORTANT: If set to TRUE then web.config is backed up and NOT Virtual Directories -->
    <exportsolutions>TRUE</exportsolutions> <!-- Option: TRUE/FALSE --> 
    <backupiis>TRUE</backupiis> <!-- Option: TRUE/FALSE --> 
    <backupgac>TRUE</backupgac> <!-- Option: TRUE/FALSE -->
    <backupulslogs>FALSE</backupulslogs> <!-- Option: TRUE/FALSE -->
    <backup14hive>TRUE</backup14hive> <!-- Option: TRUE/FALSE -->
    <backupfulldays>Saturday</backupfulldays> <!-- Used in conjunction with option 1 of backupoption - Days must be comma separated -->
    <backupthreads>1</backupthreads> <!-- Option: 1 to 10 -->
    <backupsites>TRUE</backupsites> <!-- Option: TRUE/FALSE -->
    <includemysites>FALSE</includemysites> <!-- Option: TRUE/FALSE -->
    <backupconfigonly>FALSE</backupconfigonly> <!-- Option: TRUE/FALSE -->
    <backupoption>1</backupoption> <!-- Option: 0/1/2 -->
..... but the backupjobreport.log says the following instead -
05-Apr-2013 11:53:15    Info: SharePoint site/farm backup job has started.
05-Apr-2013 11:53:15    Info: Required file params.xml found. Action: Loading XML.
05-Apr-2013 11:53:15    Warning: The backup of site(s) is set to TRUE. As a result, depending on the number of site(s) and thier size, the duration of the farm backup may increase considerably.
05-Apr-2013 11:53:15    Info: Backup share \\aumeldcpshpnt11\LMKFarmBackup$ is present and accessible. Action: No action required.
05-Apr-2013 11:53:15    Info: \\aumeldcpshpnt11\LMKFarmBackup$\Farm\ present. Action: No action required.
05-Apr-2013 11:53:15    Info: \\aumeldcpshpnt11\LMKFarmBackup$\Sites\ present. Action: No action required.
05-Apr-2013 11:53:15    Info: \\aumeldcpshpnt11\LMKFarmBackup$\IIS\ present. Action: No action required.
05-Apr-2013 11:53:15    Info: \\aumeldcpshpnt11\LMKFarmBackup$\14Hive\ present. Action: No action required.
05-Apr-2013 11:53:15    Info: \\aumeldcpshpnt11\LMKFarmBackup$\Logs\ present. Action: No action required.
05-Apr-2013 11:53:15    Info: \\aumeldcpshpnt11\LMKFarmBackup$\GAC\ present. Action: No action required.
05-Apr-2013 11:53:15    Info: \\aumeldcpshpnt11\LMKFarmBackup$\Solutions\ present. Action: No action required.
05-Apr-2013 11:53:15    Info: SharePoint Snap-in is loaded. Action: No action required.
05-Apr-2013 11:53:15    Info: Mounting drive E: to \\aumeldcpshpnt11\LMKFarmBackup$
05-Apr-2013 11:53:16    Info: Drive E: successfully mounted.
05-Apr-2013 11:53:16    Info: Determining if there is sufficient storage available for farm backup.
05-Apr-2013 11:53:16    Info: Total storage available for farm backup: 54.55 GB (55%).
05-Apr-2013 11:53:16    Info: Checking that My Site Host exists and is accessible.
05-Apr-2013 11:53:17    Warning: An error occurred whilst determining the My Site Host. Reason: Exception calling ".ctor" with "1" argument(s): "Object reference not set to an instance of an object."
05-Apr-2013 11:53:18    Info: Include MySites is set to: FALSE. Skipping calculation of storage used by MySites.
05-Apr-2013 11:53:22    Info: Total storage required for site(s) backup: 3.87 GB.
05-Apr-2013 11:53:22    Info: Total storage required for farm backup: 51 GB.
05-Apr-2013 11:53:25    Info: There is not enough storage available to carry out a FULL farm backup. Action: Attempting to clean up old backups (based on retention stipulated in params.xml)and free up additional storage.
05-Apr-2013 11:53:25    Info: Attempting to delete backup job report(s) older than [7] day(s).
05-Apr-2013 11:53:25    Info: There are no file(s) older than [7] day(s). Action: Nothing deleted.
05-Apr-2013 11:53:25    Info: Attempting to delete SharePoint site backup(s) older than [7] day(s).
05-Apr-2013 11:53:25    Info: There are no file(s) older than [7] day(s). Action: Nothing deleted.
05-Apr-2013 11:53:25    Info: Attempting to delete 14 Hive backup(s) older than [7] day(s).
05-Apr-2013 11:53:25    Info: There are no file(s) older than [7] day(s). Action: Nothing deleted.
05-Apr-2013 11:53:25    Info: Attempting to delete ULS Log backup(s) older than [7] day(s).
05-Apr-2013 11:53:25    Info: There are no file(s) older than [7] day(s). Action: Nothing deleted.
05-Apr-2013 11:53:25    Info: Attempting to delete GAC (Global Assembly Cache) backup(s) older than [7] day(s).
05-Apr-2013 11:53:25    Info: There are no file(s) older than [7] day(s). Action: Nothing deleted.
05-Apr-2013 11:53:25    Info: Attempting to delete IIS backup(s) older than [7] day(s).
05-Apr-2013 11:53:25    Info: There are no file(s) older than [7] day(s). Action: Nothing deleted.
05-Apr-2013 11:53:25    Info: spbrtoc.xml file found. Action: Loading XML.
05-Apr-2013 11:53:25    Info: Checking for backups older than 7 day(s).
05-Apr-2013 11:53:25    Info: SharePoint farm backup spbr0000 not older than 7 day(s). Action: Nothing deleted.
05-Apr-2013 11:53:25    Info: Determining if there is sufficient storage available for farm backup.
05-Apr-2013 11:53:25    Info: Total storage available for farm backup: 54.55 GB (55%).
05-Apr-2013 11:53:25    Info: Checking that My Site Host exists and is accessible.
05-Apr-2013 11:53:25    Warning: An error occurred whilst determining the My Site Host. Reason: Exception calling ".ctor" with "1" argument(s): "Object reference not set to an instance of an object."
05-Apr-2013 11:53:25    Info: Include MySites is set to: FALSE. Skipping calculation of storage used by MySites.
05-Apr-2013 11:53:25    Info: Total storage required for site(s) backup: 3.87 GB.
05-Apr-2013 11:53:25    Info: Total storage required for farm backup: 51 GB.
05-Apr-2013 11:53:25    Info: Dismounting drive E:.
05-Apr-2013 11:53:25    Info: Drive E: successfully dismounted.
05-Apr-2013 11:53:25    Error: There is not enough storage available to carry out a FULL farm backup. Action: Ensure there is sufficient storage available and re-launch backup.
05-Apr-2013 11:53:25    Result: SharePoint site/farm backup job exited prematurely with error(s).
What I don't quite get is why it's not switching to Option 1. Any thoughts / tips would be greatly appreciated - many thanks in advance.
Coordinator
Apr 5, 2013 at 7:53 AM
Hi

You have highlighted the very thing that I have corrected in v2.4

I didnt particularly like the way I had originally tried to manage the enough/not enough storage situation in v2.3 and so i reworked it. For example, the storage check and then clean up was pointless as the old files were going to be deleted anyway so why include them in the original check? So again I reworked the order and in v2.4 it makes more sense. The files will be cleaned first and then a check of available storage carried out.

Now with regards to your particular issue, i note that you have Option 1 set:

__ [1] FULL: Selected day(s) as stipulated in params.xml
     DIFF: Remaining Days__
So as you correctly point out, it should execute a DIFF backup.

I used the SPFarm.DiskSizeRequired Property. More Info here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spfarm.disksizerequired.aspx

What that does is calculate the storage required for a FULL backup. It doesnt differentiate between FULL and DIFF. Also, important thing to note here is it INCLUDES the logs when making the calculation. So it pushes the storage required threshold up.

What I didn't do however is include the -FORCE switch on the DIFF backup which would ignore the fact that the storage required was for a FULL backup. In truth, i tried to be a little to clever and reinvent the wheel instead of correctly utilising the checks already in the cmdlet.

Again, I have corrected this in v2.4

If you email me I can send a copy of v2.4 which will correct this issue or you can wait until I release v2.4 in the next few days.

Darren
Apr 5, 2013 at 10:00 AM
Hi Darren,

Terrific news - I'll email you and will let you know how it goes. Many thanks!