Microsoft SQL ServerBackup and Restore Database

Syntax

  • BACKUP DATABASE database TO backup_device [ ,...n ] WITH with_options [ ,...o ]
  • RESTORE DATABASE database FROM backup_device [ ,...n ] WITH with_options [ ,...o ]

Parameters

ParameterDetails
databaseThe name of the database to backup or restore
backup_deviceThe device to backup or restore the database from, Like {DISK or TAPE}. Can be separated by commas ( , )
with_optionsVarious options which can be used while performing the operation. Like formatting the disk where the backup is to be placed or restoring the database with replace option.

Related Examples

Basic Backup to disk with no options