Things to remember
- Central Admin application pool account must have read/write access to the backup folder.
- Your SQL Service account must have read/write access to the to the backup folder.
- The Scheduling account should have elevated privileges.
- If you’re running a farm backup from STSADM or Windows PowerShell, the account you’re running it as must have read/write access to to the backup folder.
- The location must be accessible from the SharePoint machine the backup is running on.
- The location must be accessible from the SQL instance that SharePoint is trying to back up.
- In the windows scheduler check the option “Do not store password” this is needed for authenticate to the UNC Path
Add-PSSnapin Microsoft.SharePoint.PowerShell
Backup-SPFarm -Directory \\ServerName\Share -BackupMethod full
Save as PS1 file, create a basic task and add “Action” – Set to Start a Program.
Program/Script is “PowerShell”. Add argument for your script (“C:\scripts\FarmBackup_full.ps1”)
Happy Hunting
Hello,
I have strange problem: If I run this code in powershell, everything is OK.
But, if I run it in windows scheduler, it lasts forever. At the end, I have to stop it.
I checked all task settings, tried all combinations, but still have the same problem.
Any help?
Thanks