Quantcast
Channel: Geekswithblogs.net | team Posts
Viewing all articles
Browse latest Browse all 50

How to backup the TFS 2012 databases

$
0
0

Team Foundation Server Backups - You need to install the ‘Visual Studio Team Foundation Server 2012 Update xx Power Tool’ on the application-tier for Team Foundation Server. The tool can schedule backups for the following databases that your deployment of Team Foundation Server uses:

  • the configuration database
  • the database for each team project collection
  • the databases that Team Foundation Server uses in conjunction with SharePoint Products, if your deployment includes integration with SharePoint Products
  • the databases that Team Foundation Server uses in conjunction with SQL Server Reporting Services, if your deployment includes reports
  • By using the restore wizard included with this tool, you can restore your entire deployment to new hardware, or selectively restore team project collections to an earlier point in time.

 

Note – There is a backup and restore power tool available for Team Foundation Server 2012. The current release of the power tool can be found here. Manually configuring backups is also possible, If your organization has a policy which stops you from installing the TFS power tool on the TFS application tier then you might benefit from the step by step of how to configure the backup of your TFS database, this has been very well documented on the Visual Studio MSDN site.

 

Prerequisites

The three prerequisites for setting up the Backup using the Visual Studio Team Foundation Server 2012 Update xx Power Tools are,

  • The Network Path: You need to set up a network path which is accessible from your TFS Administration console and the account that will be logging in to TFS Application Tier to configure the Backups should have modify permissions on this folder. The TFS database instance service account also needs to have modify permissions on this share. I will be using the network share \\WIN2K12TFSBTCON\TfsDbBackup

  • The TFS Database Instance Name: You need to know the TFS Database Instance, you can find this out by looking at the TFS Administration console section ‘Data Tier Summary’ on the TFS Application Tier. I will be using ‘Win2k12SQL12’ as the database instance in this blog post.

          image   

  • The TFS Database instance Service Instance: You should ideally use the TFS database instance service account. If you don’t know what it is, you can log on to the database server and look at the identity the SQL Server service is running under. I will be using ‘Sandcastle\svc12sqlservice’ in the blog post.

         image

Let’s get started…

     1. Download the Microsoft Visual Studio Team Foundation Server 2012 Update 1 Power Tool from here

        http://visualstudiogallery.msdn.microsoft.com/b1ef7eb2-e084-4cb8-9bc7-06c3bad9148f 

     2.  Launch the Installer for the Visual Studio Team Foundation Server 2012 Update 1 Power Tool,

       image 

       3. If you don’t have Visual Studio 2012 or Visual Studio 2012 Team Explorer installed on the TFS AT, you will not be take advantage of the below listed features that the Power tool offers, you *don’t* however need to install either Visual Studio 2012 or Team Explorer 2012 to set up TFS database backups.

        image

     4. Choose Custom installation mode

        image

     5. Database Backup Tool is of main interest to us, you can disable the other 2 if you don’t want to install them on the TFS Application Tier

        image

     6. Click Next to start the installation

        image

     7.  Click finish to close the set up once it completes

        image 

       8. You will notice a new addition ‘Database Backup Tools’ added to your TFS Administration Console. Click on it and from the right pane choose ‘Create Backup Panel’ 

        image

      9. Enter a network backup Path where you would like the backups to be created. Enter the retention days based on the policy followed at your company. This fields accepts a value between 1 and 999 days.

       image

      10. The backups will be encrypted using the key for which you are required to provide a password that is at least 7 characters long and contains one uppercase letter, one lowercase letter and one number.

        image

     11. Enter the SQL server instance name and click ‘List Available Databases’ to see a full list of databases deployed on the instance. You can optionally choose to backup the SharePoint database as part of this backup plan.

        image

    12. I have selected the ‘TFS_Configuration’, ‘TFS_Warehouse’, ‘TFS_Mycollection’, ‘Master’, ‘Model’ and ‘Msdb’ database

        image

     13. Enter the details of the service account which is currently running the TFS SQL server instance service on your database server. Click on test to verify credential details.

        image

     14. Specify the email you would like the backup plan tool to send alert emails to in case the backup fails. If you decide to choose ‘No email alerts' then the failures are logged in the event logs instead. 

       image

    15. You can select the backup plan that is most suitable to your needs.

          Choose one from,

           Manual backup– Suitable for smaller set ups

           Nightly Full Schedule– Suitable for small to medium set ups

           Advanced Schedules– Best for large set ups where you would like to enable a mix of full and incremental backups.

         image

     16. Press next to come to the summary page and click verify to go through the configurations and validate the steps before performing the setup

         image

    17. Validation!

        image

    18. Validation complete, choose ‘Create Plan’ to create the plan

        image

    19. When the plan creation successfully completes, you will be presented with the below screen.

        image

    20. Click Next and Close to close the wizard.

       image

    21. In the TFS Admin console I can see the plan settings.

       image

    22. If you had opted for Manual backup, you can click the ‘Take Full Backup Now’ link to trigger the backup

       image

     23. The backup process starts and you can see the progress in the window.

       image

     24. Open the network share specified in backup plan and notice the backups created by running the full back backup trigger from the administration console.

        image

Caveats

  1. During validation the steps are executed under the account currently logged into the Application Tier. In my case, it is currently Domain\Administration. This account does not have read/modify permissions on the network share and hence it fails the validation. The easy fix is to give the user Domain\Administrator Read/Modify permissions to the network share and click on re run readiness checks.

         TF254027: You must correct all error before you continue.

         Detailed Results:

         Fix: Error:“Account Domain\AccountName failed to create backups using path \\networkpath\folder

       image

     2. You cannot backup and restore the tempdb using the backup power tool. If you try to backup or restore the tempdb using the backup tool you will run into the error

    ‘Backup and restore operations are not allowed on database tempdb.’

        image

      3. Recreating the backup plan will result in the warning ‘The following tasks exists and will be deleted: TfsDeleteOldBackup’, nothing to worry about, this is just an indication that the old backup plan created in the database will be deleted

         image

Hope you found this useful…

Have you run into a problem or have feedback, please leave a comment.

Cheers,

Tarun


Viewing all articles
Browse latest Browse all 50

Trending Articles