Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / DevOps / TFS

Error During Configuration of Scheduled Backups for Team Foundation Server

5.00/5 (2 votes)
16 Aug 2014CPOL2 min read 17.1K  
Error during configuration of Scheduled Backups for Team Foundation Server

This post Error during configuration of Scheduled Backups for Team Foundation Server written by Manas Bhardwaj appeared first on Manas Bhardwaj's Stream.

Another situation which should be easy and straight forward, but then you realize that it does not work.

I wanted to set up my own Team Foundation Server Express (yes, it’s a light, free version with certain limitations but a good way to start for your small team or organisation). The installation process is quite straight forward and clear.

However, when I wanted to configure the scheduling for back-ups of my TFS database, I was continuously receiving the error below:

TF401009: The TFS service account NT AUTHORITY\LOCAL SERVICE cannot access network shares. Change to an account that can access the backup path.

TF400997: SQL Server service is running as NT AUTHORITY\NetworkService. Please change this account to an account that can be granted permission on the backup path.

Untitled

I had given permissions to both the accounts on the network share. Actually, it was a shared folder on the same machine as I installed the TFS in single server mode.

To add a bit of background, my Team Foundation Service was running under Local Service and SQL Server was running under Network Service. This is the reason why these two accounts come into the picture.

Looking at the logs, it was more clear that for scheduling backups, TFS expects the proper (preferably service) accounts to be used to run SQL Server and Team Foundation Service. The following error messages can be seen in the log.

Verify that account ‘NT AUTHORITY\NetworkService’ is not local service or local system.
Node returned: Error
TF400997: SQL Server service is running as NT AUTHORITY\NetworkService. Please change this account to an account that can be granted permission on the backup path.

And a similar one for TFS Service as well.

Resolution

The resolution is to change the Service account for both SQL Server (MSSQLSERVER) and TFSJobAgent (Visual Studio Team Foundation Background Job Agent) to another account.

Capture

However, this seems to be check only during the configuration. And if you change the service log on user back to Network and Local Service after configuration, the backup procedure still runs without any hassle.

Not sure about the details why this is prevented during configuration. If you are aware of the reason, please share!

This post Error during configuration of Scheduled Backups for Team Foundation Server written by Manas Bhardwaj appeared first on Manas Bhardwaj's Stream.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)