How to create a database backup (Transact-SQL)

To create a database backup

  1. Execute the BACKUP DATABASE statement to create the database backup, specifying:
  2. Optionally, specify:

Important Use extreme caution when using the FORMAT or INIT clauses of the BACKUP statement as this will destroy any backups previously stored on the backup media.


Examples

This example backs up the entire MyNwind database to tape without creating a permanent (named) backup device.

USE MyNwind

GO

BACKUP DATABASE MyNwind

    TO TAPE = '\\.\Tape0'

    WITH FORMAT,

    NAME = 'Full Backup of MyNwind'

GO

  

See Also
sp_addumpdevice Creating and Restoring a Database Backup
Appending Backup Sets to Existing Media Creating and Restoring Differential Database Backups
Backing Up the master Database Deleting a Database
Backing Up the model, msdb, and distribution Databases Overwriting Media
BACKUP Using Differential Database Backups with Transaction Log Backups
Creating and Applying Transaction Log Backups Using Media for the First Time

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.