Why am I not able to create a backup plan for TFS?

I am trying to create a backup plan using the TFS Power Tools but I keep running into this error message: TFS Backup Error

I have checked that the account has Full Control on the share, I can edit, create and delete files there. From the log:

[Info   @07:15:00.403] Starting creating backup test validation
[Error  @07:15:00.700] Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server 'WMSI003714N\SqlExpress'.  ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Cannot open backup device '\\wmsi003714n\sql dump\Tfs_Configuration_20100910091500.bak'. Operating system error 5(failed to retrieve text for this error. Reason: 1815).
BACKUP DATABASE is terminating abnormally.
   at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
   at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
   at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)
   at Microsoft.TeamFoundation.PowerTools.Admin.Helpers.BackupFactory.TestBackupCreation(String path)
[Error  @07:15:00.731] !Verify Error!: Account GROUPINFRA\SA-NO-TeamService failed to create backups using path \\wmsi003714n\sql dump
[Info   @07:15:00.731] "Verify: Grant Backup Plan Permissions\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Exiting Verification with state Completed and result Error"

Any ideas?


Solution 1:

I had the same problem and noticed that your share name "sql dump" has a space in it, just like mine. I removed the space character and it worked fine!!

Solution 2:

Does the account you are using to run the backup also have full control (or at least write) on the file system folder that is shared (i.e. both share and folder permissions allow writing)?

Remember that the account creating the job isn't necessarily the account running it (this might not apply as, IIRC, Power Toys backup doesn't use SQL Agent).

Try monitoring the destination with Process Monitor to see if it is a failure in SQL Server (i.e. fails before any file create/write) or in writing.