MS SQL

Version as of 22:24, 3 May 2024

to this version.

Return to Version archive.

View current version


Microsoft SQL Server Backup

When Zmanda Client for Windows is configured and licensed for Microsoft SQL backup, it uses the Microsoft Volume Shadow Services to back up the SQL database(s) and logs. ZWC uses either SQL Server VSS Writer or MSDE Writer or both, depending how the SQL server is configured for database backup.

Requirements for Microsoft SQL Server Backup and Restore

These instructions assume you have already installed and licensed the Amanda Enterprise server and the Microsoft SQL Server being backed up. There are a number of additional requirements:

  • The Volume Shadow Copy Service must be enabled. Although the Volume Shadow Service is enabled by default, it may have been turned off after Windows installation. To ensure that it is running:
  1. Right-click the My Computer icon and choose Manage from the popup menu.
  2. Expand the Services and Applications tree and locate the Volume Shadow Copy Service.
  3. If it is not started, do so.
  4. If necessary, change the General Properties to make the Startup Type Automatic rather than Manual.

  • ZMC will only back up MS SQL databases that are in Mounted state.
  • Microsoft recommends that MSSQL and System State back ups are not run simultaneously.
  • ZMC only backs up the MS SQL databases. It does not back up other MSSQL files such as program installation files, etc. To protect an MS SQL server from a disaster, make sure that you create a separate disk list entry to back up the other crucial MS SQL files .

Configuring Microsoft SQL Server Backups from the ZMC Backup What Page

Create a dedicated backup set for each Microsoft SQL Server you intend to back up. On the Backup What page you are prompted to select what type of object you want to back up. Choose mssql, and the following options are displayed:

Microsoft SQL Server Backup What Options

Host Name
The name of the machine running the Microsoft SQL server you intend to back up.
Compression
Check the box to compress backup images before transfer to the Amanda backup server.

After you have set the options, click the Add button to add the Microsoft SQL Server object to the backup set. Click Apply to Server to commit the changes; you can then configure the backup set just as you would any other by setting the options on Backup Where, Backup How, and Backup When, etc.

Configuring Microsoft SQL Server Restores from the ZMC Restore What Page

Make sure that MS SQL is installed in the same location as when the backup was run. The databases and logs file locations should also match the original configuration. When you have selected the disk list entry that includes the MS SQL databases for restore, the Restore What page displays the following options: Fig 1. MS SQL Restore What Options

Select all the host databases and log files on the Restore->What page. The Zmanda Windows Client will automatically stop the MS SQL Server and all dependent services as a pre-restore procedure. Although the MS-SQL service is automatically restarted by the Zmanda client after the restore, dependent services are not restarted.  To see what dependent services may need to be restarted after a restore, click Start, then right-click on My Computer and select Manage... from the pop-up menu. Click Services, then double-click Microsoft SQL from the list of services to display its properties.  The Dependencies tab will display any SQL-dependent services that you should restart.

Troubleshooting

If an MS SQL backup fails, follow these troubleshooting steps:

  1. Check the Windows Event Viewer for any VSS or SQL Server VSS Writer or MSDE Writer errors. Run the command vssadmin list writers at the Windows command prompt and check that the SQL Server VSS/MSDE Writers are in a stable state. If not (or if there are any VSS errors, restart the Writers and Volume Shadow Copy Service).
  2. Make sure that the SQL databases are in Mounted state.

Troubleshooting Restores

  • If the SQL databases do not mount, refer to Microsoft documentation.