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. Note |
---|
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 DatabaseThe following procedure backs up the TFS database. Note |
---|
Critical: This MUST be performed on the server/workstation that hosts the TFS database. |
- Open SQL Server Management Studio Express (Start > All Programs > Microsoft SQL Server 2008 > SQL Server Management Studio).
- Login to Microsoft SQL Server.
- In the Object Explorer pane, expand: [server name] > Databases
- 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.
Specify a Name and Destination for the backup file, if different from the default name and destination details. Note |
---|
Write down the name and destination details. |
- Select the Options page.
- Tick: Overwrite all existing backup sets
- Tick: Verify backup when finished
- Click the OK button. The backup will be performed.
- Click the OK button to close the message prompt.
- Close SQL Server Management Studio Express.
- Browse to the backup location (as detailed in Point 5 above).
- 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 BackupThe following procedure restores a backup of the TFS database. - Open Microsoft SQL Server Management Studio Express (Start > All Programs > Microsoft SQL Server 2008 > SQL Server Management Studio).
- Login to Microsoft SQL Server.
- In the Object Explorer pane, expand: [server name] > Databases
- Right-click on the The Finance Shop database (e.g., TFSMain) and select Tasks > Restore > Database. The Restore Database dialog will be displayed.
- In the To Database field, enter the TFS Database Name, if required. Example: TFSMain
- Click the From Device field.
- 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.
- In the Restore column, tick the backup to be restored.
- Select the Options tab.
- Tick: Overwrite the existing database (WITH REPLACE)
- Click the OK button. The database restoration will be performed.
- Close Microsoft SQL Server Management Studio.
Note |
---|
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). |
|