0

I use to run these commands to backup our sharepoint site collections and our farm without any problem:-

backup-spsite  http://****01/sites/home/  -Path E:\Back\BFH.bak
Backup-SPFarm -Directory  \\**01\Back -BackupMethod full -BackupThreads 10 -Force

but recently i am getting these errors when i run the above commands inside sharepoint powershell:-

backup-spsite  http://****01/sites/home/  -Path E:\Back\BFH.bak

backup-spsite : You must specify a filename for the backup file. At line:1 char:1 + backup-spsite http://***01/sites/home/ -Path E:\Back\BFH.bak

 Backup-SPFarm -Directory  \\**01\Back -BackupMethod full -BackupThreads 10 -Force

Backup-SPFarm : Directory \***01\Back does not exist or the SQL Server service account and the ***\s****m.srv service account do not have permission to read or write to the backup folder. Specify a different directory or ensure that the SharePoint Timer service and Microsoft SQL Server service accounts have Full Control permission on both the file share and the underlying folder. At line:1 char:1 + Backup-SPFarm -Directory \****01\Back -BackupMethod full -BackupThreads 10 ...

although i am running these commands using the farm account. also when i run the farm backup commnad using windows powershell instead of sharepoint powershell, i got this error:-

PS C:\> Add-PSSnapin "Microsoft.SharePoint.PowerShell" 

Backup-SPFarm -Directory  \\***01\Back -BackupMethod full -BackupThreads 10 -Force

Backup-SPFarm : You need to have Machine administrator priviliges to run this cmdlet.

so can anyone advice on this please? Thanks

2

Your SQL Server service account must have NTFS Modify and at least Share permissions Modify. I usually recommend using Share permissions set to Full Control for Everyone and narrowing the scope of the NTFS permissions (e.g. strip machinename\Users and add the appropriate service accounts with NTFS Modify rights).

You also need to make sure you're a local administrator on all SharePoint servers and have at least the backup right on the SQL Server or the sysadmin fixed role. Make sure you're running the SharePoint Management Shell 'as administrator'.

  • thanks for the help, now i am running the scripts using the sharepoint farm account, which is a managed account inside sharepoint admin. and the user is a local admin inside the sharepoint application server and i am running the power-shell management shell as admin... so seems i have everything set correctly. but i am not sure what do you exactly mean by Your SQL Server service account must have NTFS Modify and at least Share permissions Modify ? where do i need to add this account, to the drive where i am saving the backup files? and how i can know what is oor sql service account? – SharePoint TestDev Jan 6 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.