Microsoft SQL Server Backup and Restore Database

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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.


Got any Microsoft SQL Server Question?