locked
TFS2010 Basic Install backup on workstation

    Domanda

  • I have a windows 7 workstation running SQL Developer and TFS2010 with a Basic Installation. I installed the Power Tools, September release. This is a two part question.

    First I want to use the Backup feature in the Power Tools but I can't backup to a local folder, I understand that the purpose is to send it to another machine but I have Mozy running on my laptop and its scheduled to backup files off site so I am cover there. I tried to make a local folder and give it the correct permissions and when the backup tool asked for a network path I tried to use my machine name that its running on and the share name, it didn’t work. Any help on what to do would be great?

    The second thing is I tried to update the Power tools to the latest release but when I do there are service running that prevent it from continuing unless I ignore and continue but I don’t want to do that.  If that’s for another thread that’s fine, I really need an answer to the first question, this is just here for reference and a reason I haven’t upgraded the tool yet.

    domenica 12 febbraio 2012 23:22

Risposte

  • Ok so I solved the issue:

    I uninstalled the older version of Power Tools and rebooted the machine, I installed the newer version the December release.  Then I opened the SQL Server Configuration Manager, I changed the SQL Server and SQL Full-text Filter Daemon Launcher to use the "NT Authority\NetworkService"

    I create a share added the network service, "NT Authority\NetworkService", to it giving it full permsions and I also added the acccount that I log onto the system with again with full control. 

    I rebooted the machine, I probalby could have just restarted the TFS service from a command line but this seemed cleaner since there are a few changes to the system.  Once rebooted I was able to use the backup utility as it was designed to.


    • Contrassegnato come risposta HippyCraig sabato 18 febbraio 2012 00:02
    • Modificato HippyCraig sabato 18 febbraio 2012 00:04
    sabato 18 febbraio 2012 00:02

Tutte le risposte

  •  

    Hi HippyCraig, 

    Thanks for your post. 

    As far as I know, we can use TFS Power Tools Backup feature backup files to the local folder, this local folder must be the UNC path, and your Backup account have the required permission on your local folder(UNC path). For example, your local folder is TFSBackup, so you need can find this folder by typing \\computerName\TFSBackup in your local machine.  Then provide the \\computerName\TFSBackup as the Network Backup Path in your backup plan.

    If you want to upgrade the TFS Power Tools 2010 September to TFS Power Tools 2011 December, you should to uninstall the TFS Power Tools 2010 September first, then install TFS Power Tools 2011 December. 

    For how to perform backup step by step, please refer to this blog: http://blogs.msdn.com/b/bharry/archive/2010/08/18/backing-up-and-restoring-your-tfs-server.aspx.    


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    lunedì 13 febbraio 2012 03:07
  • I did that and it failed.  I created a share off the root of C and gave the local system account full control.  I followed the backup wizards and when it asked for a share I used \\MACHINE\TFSBackup.  It still failes attached below is a last part of the log, not sure what to do?

    [Info   @00:37:09.372] Verify Sql server Permissions Granted Successfully
    [Info   @00:37:09.403] Granting account NT AUTHORITY\LOCAL SERVICE permissions on server ushcwin7lt03v1
    [Info   @00:37:09.403] "Verify: Grant Backup Plan Permissions\Root\VerifySqlServerPermissionsGrantedSuccessfully(VerifySqlServerPermissionsGrantedSuccessfully): Exiting Verification with state Completed and result Success"
    [Info   @00:37:09.403] Verify: Grant Backup Plan Permissions\Root\VerifySqlDatabasesPermissionsGrantedSuccessfully(VerifySqlDatabasesPermissionsGrantedSuccessfully): Starting Verification
    [Info   @00:37:09.403] Verify Sql databases Permissions Granted Successfully
    [Info   @00:37:09.434] ModifyExecRole: Add:NT AUTHORITY\LOCAL SERVICE
    [Info   @00:37:09.434] result: Noop
    [Info   @00:37:09.434] ModifyExecRole: Add:NT AUTHORITY\LOCAL SERVICE
    [Info   @00:37:09.450] result: Noop
    [Info   @00:37:09.450] "Verify: Grant Backup Plan Permissions\Root\VerifySqlDatabasesPermissionsGrantedSuccessfully(VerifySqlDatabasesPermissionsGrantedSuccessfully): Exiting Verification with state Completed and result Success"
    [Info   @00:37:09.450] Verify: Grant Backup Plan Permissions\Root\VerifyBackupPathPermissionsGrantedSuccessfully(VerifyBackupPathPermissionsGrantedSuccessfully): Starting Verification
    [Info   @00:37:09.450] Verify backup path Permissions Granted Successfully
    [Info   @00:37:09.481] System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.
       at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess)
       at System.Security.Principal.NTAccount.Translate(Type targetType)
       at Microsoft.TeamFoundation.PowerTools.Admin.Helpers.FileHelper.GrantFolderPermission(String account, String path)
    [Info   @00:37:09.481] Granting account NT AUTHORITY\LOCAL SERVICE permission on folder \\USHCWIN7LT03V1\TFSBackup
    [Error  @00:37:09.481] Granting permission to account LocalSystem on path \\USHCWIN7LT03V1\TFSBackup failed
    [Error  @00:37:09.481] MSSQL Server service account LocalSystem does not have the required permissions to create backups on the backup path \\USHCWIN7LT03V1\TFSBackup
    [Error  @00:37:09.481] !Verify Error!: MSSQL Server service account LocalSystem does not have the required permissions to create backups on the backup path \\USHCWIN7LT03V1\TFSBackup
    [Info   @00:37:09.481] "Verify: Grant Backup Plan Permissions\Root\VerifyBackupPathPermissionsGrantedSuccessfully(VerifyBackupPathPermissionsGrantedSuccessfully): Exiting Verification with state Completed and result Error"
    [Info   @00:37:09.481] Verify: Grant Backup Plan Permissions\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Starting Verification
    [Info   @00:37:09.481] Verify Test Backup Created Successfully
    [Info   @00:37:09.497] Starting creating backup test validation
    [Error  @00:37:10.387] Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server 'USHCWIN7LT03V1'.  ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Cannot open backup device '\\USHCWIN7LT03V1\TFSBackup\temp_20120213193709.bak'. Operating system error 5(Access is denied.).
    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  @00:37:10.419] !Verify Error!: Account USHCWIN7LT03V1\Craig failed to create backups using path \\USHCWIN7LT03V1\TFSBackup
    [Info   @00:37:10.419] "Verify: Grant Backup Plan Permissions\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Exiting Verification with state Completed and result Error"
    [Info   @00:37:10.419] !Verify Result!: 4 Completed, 0 Skipped: 2 Success, 2 Errors, 0 Warnings
    [Info   @00:37:10.434] Verify: Backup Tasks Verifications(VCONTAINER): Starting Verification
    [Info   @00:37:10.434] A generic container node that does not contribute to results
    [Info   @00:37:10.434] "Verify: Backup Tasks Verifications(VCONTAINER): Exiting Verification with state Ignore and result Ignore"
    [Info   @00:37:10.434] Verify: Backup Tasks Verifications\Root(VCONTAINER): Starting Verification
    [Info   @00:37:10.434] A generic container node that does not contribute to results
    [Info   @00:37:10.434] "Verify: Backup Tasks Verifications\Root(VCONTAINER): Exiting Verification with state Ignore and result Ignore"
    [Info   @00:37:10.434] Verify: Backup Tasks Verifications\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Starting Verification
    [Info   @00:37:10.434] Verify Test Backup Created Successfully
    [Info   @00:37:10.434] Starting creating backup test validation
    [Error  @00:37:10.669] Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server 'USHCWIN7LT03V1'.  ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Cannot open backup device '\\USHCWIN7LT03V1\TFSBackup\temp_20120213193710.bak'. Operating system error 5(Access is denied.).
    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  @00:37:10.684] !Verify Error!: Account USHCWIN7LT03V1\Craig failed to create backups using path \\USHCWIN7LT03V1\TFSBackup
    [Info   @00:37:10.684] "Verify: Backup Tasks Verifications\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Exiting Verification with state Completed and result Error"
    [Info   @00:37:10.684] !Verify Result!: 1 Completed, 0 Skipped: 0 Success, 1 Errors, 0 Warnings
    [Info   @00:37:10.700]
    [Info   @00:37:10.700] -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    [Info   @00:37:10.700] Verify Summary
    [Info   @00:37:10.700] -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    [Info   @00:37:10.700] 4 errors, 0 warnings, 0 skipped, 0 informational
    [Info   @00:37:10.700]
    [Info   @00:37:10.700] +-+-+-+-+-| Verify Complete. |+-+-+-+-+-

    martedì 14 febbraio 2012 00:46
  •  

    Hi HippyCraig, 

    Thanks for your reply.

    According the log, it seems that your MSSQL Server service account LocalSystem does not have the required permissions to create backups on your backup path \\USHCWIN7LTO3V1\TFSBackup. Does your SQL Server install on another machine? 

    Try to share the \\USHCWIN7LTO3V1\TFSBackup folder for Everyone(Read and Write) to do a test, if the backup plan can be created in this case, it seems that’s a permission issue.    

    Which TFS Power Tools you are using? I suggest you install the TFS Power Tools 2011 December and use it. 


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    martedì 14 febbraio 2012 03:07
  • I updated the power tools to the latest version Dec 2011.  I still get an error, I even added Everyone with full permisions and still I get errors

    [Info   @03:51:41.272] "Verify: Grant Backup Plan Permissions\Root(VCONTAINER): Exiting Verification with state Ignore and result Ignore"
    [Info   @03:51:41.272] Verify: Grant Backup Plan Permissions\Root\VerifyLogOnAsBatchJobPermissionGrantedSuccessfully(VerifyLogOnAsBatchJobPermissionGrantedSuccessfully): Starting Verification
    [Info   @03:51:41.272] Verify Logon as batch job Permission Granted Successfully
    [Info   @03:51:41.272] Skipping granting 'Logon as batch job' for account LocalService
    [Info   @03:51:41.272] "Verify: Grant Backup Plan Permissions\Root\VerifyLogOnAsBatchJobPermissionGrantedSuccessfully(VerifyLogOnAsBatchJobPermissionGrantedSuccessfully): Exiting Verification with state Ignore and result Ignore"
    [Info   @03:51:41.272] Verify: Grant Backup Plan Permissions\Root\VerifySqlServerPermissionsGrantedSuccessfully(VerifySqlServerPermissionsGrantedSuccessfully): Starting Verification
    [Info   @03:51:41.272] Verify Sql server Permissions Granted Successfully
    [Info   @03:51:41.272] Granting account NT AUTHORITY\LOCAL SERVICE permissions on server ushcwin7lt03v1
    [Info   @03:51:41.272] "Verify: Grant Backup Plan Permissions\Root\VerifySqlServerPermissionsGrantedSuccessfully(VerifySqlServerPermissionsGrantedSuccessfully): Exiting Verification with state Completed and result Success"
    [Info   @03:51:41.272] Verify: Grant Backup Plan Permissions\Root\VerifySqlDatabasesPermissionsGrantedSuccessfully(VerifySqlDatabasesPermissionsGrantedSuccessfully): Starting Verification
    [Info   @03:51:41.272] Verify Sql databases Permissions Granted Successfully
    [Info   @03:51:41.334] ModifyExecRole: Add:NT AUTHORITY\LOCAL SERVICE
    [Info   @03:51:41.334] result: Noop
    [Info   @03:51:41.334] ModifyExecRole: Add:NT AUTHORITY\LOCAL SERVICE
    [Info   @03:51:41.334] result: Noop
    [Info   @03:51:41.334] "Verify: Grant Backup Plan Permissions\Root\VerifySqlDatabasesPermissionsGrantedSuccessfully(VerifySqlDatabasesPermissionsGrantedSuccessfully): Exiting Verification with state Completed and result Success"
    [Info   @03:51:41.334] Verify: Grant Backup Plan Permissions\Root\VerifyBackupPathPermissionsGrantedSuccessfully(VerifyBackupPathPermissionsGrantedSuccessfully): Starting Verification
    [Info   @03:51:41.334] Verify backup path Permissions Granted Successfully
    [Info   @03:51:41.366] System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.
       at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess)
       at System.Security.Principal.NTAccount.Translate(Type targetType)
       at Microsoft.TeamFoundation.PowerTools.Admin.Helpers.FileHelper.GrantFolderPermission(String account, String path)
    [Info   @03:51:41.366] Granting account NT AUTHORITY\LOCAL SERVICE permission on folder \\USHCWIN7LT03V1\TFSBackup
    [Error  @03:51:41.366] Granting permission to account LocalSystem on path \\USHCWIN7LT03V1\TFSBackup failed
    [Error  @03:51:41.366] MSSQL Server service account LocalSystem does not have the required permissions to create backups on the backup path \\USHCWIN7LT03V1\TFSBackup
    [Error  @03:51:41.366] !Verify Error!: MSSQL Server service account LocalSystem does not have the required permissions to create backups on the backup path \\USHCWIN7LT03V1\TFSBackup
    [Info   @03:51:41.366] "Verify: Grant Backup Plan Permissions\Root\VerifyBackupPathPermissionsGrantedSuccessfully(VerifyBackupPathPermissionsGrantedSuccessfully): Exiting Verification with state Completed and result Error"
    [Info   @03:51:41.366] Verify: Grant Backup Plan Permissions\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Starting Verification
    [Info   @03:51:41.366] Verify Test Backup Created Successfully
    [Info   @03:51:41.366] Starting creating backup test validation
    [Info   @03:51:51.834] Create Test backup task returned 0
    [Info   @03:51:51.975] "Verify: Grant Backup Plan Permissions\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Exiting Verification with state Completed and result Success"
    [Info   @03:51:51.975] !Verify Result!: 4 Completed, 0 Skipped: 3 Success, 1 Errors, 0 Warnings
    [Info   @03:51:51.975] Verify: Backup Tasks Verifications(VCONTAINER): Starting Verification
    [Info   @03:51:51.975] A generic container node that does not contribute to results
    [Info   @03:51:51.975] "Verify: Backup Tasks Verifications(VCONTAINER): Exiting Verification with state Ignore and result Ignore"
    [Info   @03:51:51.975] Verify: Backup Tasks Verifications\Root(VCONTAINER): Starting Verification
    [Info   @03:51:51.975] A generic container node that does not contribute to results
    [Info   @03:51:51.975] "Verify: Backup Tasks Verifications\Root(VCONTAINER): Exiting Verification with state Ignore and result Ignore"
    [Info   @03:51:51.975] Verify: Backup Tasks Verifications\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Starting Verification
    [Info   @03:51:51.975] Verify Test Backup Created Successfully
    [Info   @03:51:51.975] Starting creating backup test validation
    [Info   @03:52:07.987] Create Test backup task returned 0
    [Info   @03:52:08.018] "Verify: Backup Tasks Verifications\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Exiting Verification with state Completed and result Success"
    [Info   @03:52:08.018] !Verify Result!: 1 Completed, 0 Skipped: 1 Success, 0 Errors, 0 Warnings
    [Info   @03:52:08.018]
    [Info   @03:52:08.018] -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    [Info   @03:52:08.018] Verify Summary
    [Info   @03:52:08.018] -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    [Info   @03:52:08.018] 2 errors, 0 warnings, 0 skipped, 0 informational
    [Info   @03:52:08.018]
    [Info   @03:52:08.018] +-+-+-+-+-| Verify Complete. |+-+-+-+-+-

    martedì 14 febbraio 2012 03:53
  • Doing a little research Local System doesnt have privliages to write files, is that correct?  If so without breaking anything how can I recofigure SQL to use a local account on the box and try this again?
    martedì 14 febbraio 2012 04:12
  • So I tired changing the SQL Service to run under another account that was an administrator, this was just to see if I can get it to work, I had to run the backup task as Local Service, which is the default.  If I tried an local account it failed, Local Service for the task succeded.  I think I need to test some more as this is running in a VM and I took a snapshot before making any changes.

    What do you recommend, should I be running SQL under a local account? And the backup task as Local Service (Defualt)?

    Looking for advice before I commit any changes 

    martedì 14 febbraio 2012 04:41
  •  

    Hi HippyCraig, 

    Thanks for your reply.

    Does there has a admin account in your SQL Server, which you can add this SQL Server admin account to your TFS 2010 Server as the TFS admin account? If yes, add this SQL Server admin account to TFS 2010 Server, then provide this account as the Task Scheduler account in your backup plan. 


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us


    martedì 14 febbraio 2012 06:25
  • Ok so I solved the issue:

    I uninstalled the older version of Power Tools and rebooted the machine, I installed the newer version the December release.  Then I opened the SQL Server Configuration Manager, I changed the SQL Server and SQL Full-text Filter Daemon Launcher to use the "NT Authority\NetworkService"

    I create a share added the network service, "NT Authority\NetworkService", to it giving it full permsions and I also added the acccount that I log onto the system with again with full control. 

    I rebooted the machine, I probalby could have just restarted the TFS service from a command line but this seemed cleaner since there are a few changes to the system.  Once rebooted I was able to use the backup utility as it was designed to.


    • Contrassegnato come risposta HippyCraig sabato 18 febbraio 2012 00:02
    • Modificato HippyCraig sabato 18 febbraio 2012 00:04
    sabato 18 febbraio 2012 00:02
  •  

    Hi HippyGraig, 

    Thanks for your reply.

    And thank you for sharing your experience here. It will be very beneficial for other community members having the similar questions.

    All your participation and support are very important to build such harmonious/ pleasant / learning environment for MSDN community.


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

    lunedì 20 febbraio 2012 01:36