Backup and Restore Database

Download sql-server eBook

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

Stats

41 Contributors: 2
Thursday, September 22, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook