Using NAS for backup location storage

Feb 1, 2012 at 7:53 PM

Hello,

I want using a remote NAS storage space location to store my backup files. I validate the users right for my Central admin, my sql account also is the storage location is accessible from my SQL and Sharepoint server and all looks good. the server name where will run the backup is WCALQW2W. Below is my config file.. I tried \\wcalqf0j\fs_data2$\DATA\SHAREPOINT\SpBackupProd in the BackupShare tag without Backupserver and like the example below but I'm getting always error like if the script is not able to access the storage space. Well After I put the remote server name for the storage I start getting the issue you mentioned about th RPC not available. If I understand correctly my config below should be ok becaus I<m using a remote location, right? So the real problem is this one about the RPC server?



<?xml version="1.0" encoding="utf-8"?>
<backup version="1.1">
  <params>
	<backupserver>wcalqf0j</backupserver> <!-- Name of server if backup share is on remote server -->
	<sendemail>TRUE</sendemail> <!-- Option: TRUE/FALSE -->
	<smtpserver>141.119.5.76</smtpserver>
	<environment>FARM NAME (PROD)</environment>
	<emailfrom>pgenest@csc.com</emailfrom>
	<emailto>pgenest@csc.com</emailto> <!-- Multiple recipients must be comma separated -->
	<emailcc>pgenest@csc.com</emailcc> <!-- Multiple recipients must be comma separated -->
	<backupwebconfigonly>FALSE</backupwebconfigonly> <!-- IMPORTANT: If set to TRUE then web.config is backed up and NOT Virtual Directories -->
	<backupiis>TRUE</backupiis> <!-- Option: TRUE/FALSE --> 
	<backupgac>TRUE</backupgac> <!-- Option: TRUE/FALSE -->
	<backupulslogs>TRUE</backupulslogs> <!-- Option: TRUE/FALSE -->
	<backup14hive>TRUE</backup14hive> <!-- Option: TRUE/FALSE -->
	<backupfulldays>Monday,Wednesday,Friday</backupfulldays> <!-- Days must be comma separated -->
	<backupmethod>FULL</backupmethod> <!-- Option: FULL/DIFF -->
	<backupthreads>3</backupthreads> <!-- Option: 1 to 10 -->
	<backupsites>TRUE</backupsites> <!-- Option: TRUE/FALSE -->
	<backupconfigonly>FALSE</backupconfigonly> <!-- Option: TRUE/FALSE -->
	<backupshare>fs_data2$\DATA\SHAREPOINT\SpBackupProd</backupshare>
	<backupoption>2</backupoption> <!-- Option: 0 FULL /1 specific day /2 Sunday -->
	<daystoretain>2</daystoretain> <!-- No. of days backups to retain -->
  </params>
</backup>
01-Feb-2012 15:36:24	Info: SharePoint site/farm backup job has started.
01-Feb-2012 15:36:24	Info: Required file params.xml found. Action: Loading XML.
01-Feb-2012 15:36:25	Error: Checking for existence of fs_data2$\DATA\SHAREPOINT\SpBackupProd failed. Reason: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
01-Feb-2012 15:36:30	Result: SharePoint site/farm backup job exited prematurely with error(s).
Coordinator
Feb 1, 2012 at 10:30 PM
Edited Feb 1, 2012 at 10:32 PM

 

Replace the Get-Folders method with the following:


 

#Region Check for the existence of the required backup share. Check/Create the required backup directories
function Get-Folders  
{				
	# if backup share not found script will exit.
	# if backup directories not found script will attempt to create them.
	try 
	{
		if (!(Test-Path "\\$backupServer\$backupShare"))
		{
			Halt-OnError "Backup share \\$backupServer\$backupShare not found. Action: Check that the share: $backupShare on server: $backupServer exists and is accessible."
		}
		else 
		{
			Write-Log "Info: Backup share \\$backupServer\$backupShare is present and accessible. Action: No action required."
		}
	}
	catch 
	{	
		$errText = $error[0].Exception.Message
		Halt-OnError "Checking for existence of $backupShare failed. Reason: $errText"
	}
	
	$folders = @($spFarmBackupDirectory, $spSiteBackupDirectory, $iisBackupDirectory, $sp14hiveBackupDirectory, $spLogsBackup, $gacBackupDirectory)	
	
	foreach ($folder in $folders) 
	{
		if (!(Test-Path $folder)) 
		{ 
			try 
			{
				New-Item $folder -type directory -ErrorAction SilentlyContinue
				Write-Log "Info: $folder not present. Action: Folder $folder created." 
			} 
			catch 
			{ 
				$errText = $error[0].Exception.Message
				Halt-OnError "There was a problem creating the folder $folder. Reason: $errText"
			}
		} 
		else 
		{
			Write-Log "Info: $folder present. Action: No action required."
		}
	}
}
#EndRegion

This removes the reliance on WMI by using the Test-Path cmdlet. You should also ensure your UNC path to the backup share is in the following format: \\Server\Share
Your current path is: \\wcalqf0j\fs_data2$\DATA\SHAREPOINT\SpBackupProd