/
Backup TFS Database

Backup TFS Database


Click the logo to return to KB


TFS Smart Campaign - Table of Contents

     

        

This topic describes the process for backing up and restoring a Microsoft SQL Server 2008 (MSSQL) database.

Backups MUST be done periodically in line with a best practice approach to data security and retention. Contact your IT Support Team for information.

This process and its examples are based on Insula Software recommendations and assumes the use of MSSQL Express.

For more information about this process, please consult your MSSQL documentation or contact your IT Support Team.

Backup a Database

The following procedure backs up the TFS database.

Critical: 

This MUST be performed on the server/workstation that hosts the TFS database.



  1. Open SQL Server Management Studio Express (StartAll ProgramsMicrosoft SQL Server 2008SQL Server Management Studio).
  2. Login to Microsoft SQL Server.
  3. In the Object Explorer pane, expand: [server name] > Databases
  4. Right-click on the The Finance Shop database (e.g., TFSMain) and select Tasks > Back Up. The Back Up Database (General Page) dialog will be displayed.
  5. Specify a Name and Destination for the backup file, if different from the default name and destination details.

    Write down the name and destination details.

  6. Select the Options page.
  7. Tick: Overwrite all existing backup sets
  8. Tick: Verify backup when finished
  9. Click the OK button. The backup will be performed.
  10. Click the OK button to close the message prompt.
  11. Close SQL Server Management Studio Express.
  12. Browse to the backup location (as detailed in Point 5 above).
  13. Copy the backup file to a secure location.

    Example: A typical example is to backup the database file (.bak file) to the following folder location: \[tfs folder]\Service\tfsBackup_[todaysDate]

Restore a Backup

The following procedure restores a backup of the TFS database.

  1. Open Microsoft SQL Server Management Studio Express (StartAll ProgramsMicrosoft SQL Server 2008SQL Server Management Studio).
  2. Login to Microsoft SQL Server.
  3. In the Object Explorer pane, expand: [server name] > Databases
  4. Right-click on the The Finance Shop database (e.g., TFSMain) and select Tasks > Restore > Database. The Restore Database dialog will be displayed.
  5. In the To Database field, enter the TFS Database Name, if required. Example: TFSMain
  6. Click the From Device field.
  7. Click the Browse button. The Specify Backup dialog will be displayed.
    • Click the Add button. The Locate Backup File dialog will be displayed.
    • Select the folder and file location of the Microsoft SQL Server backup file (In the Backup Database procedure above, see Point 5).
    • Click the OK button. The Locate Backup File dialog will close.
    • Click the OK button. The Specify Backup dialog will close.
  8. In the Restore column, tick the backup to be restored.
  9. Select the Options tab.
  10. Tick: Overwrite the existing database (WITH REPLACE)
  11. Click the OK button. The database restoration will be performed.
  12. Close Microsoft SQL Server Management Studio.


If restoring the database to a location other than the default location, in the Restore the database file as group, click the Browse button and modify the location for the database files (data and log files).