How to Back up Microsoft SQL Server Databases
Microsoft SQL Server Database Backup
There are two ways to back up SQL Server database. One way to use a VSS-powered hot copy of the database files (MDF, LDF, etc.). Alternatively, you can use SQL Server’s BACKUP DATABASE command and then have BackupChain deduplicate the backup file.
Backup MDF and LDF Files
Create a new SQL Server backup task:
Select the Microsoft SQL Server database folders for backup. The default location of database files is under C:\Program Files\Microsoft SQL Server
Ensure the service “SQL Server VSS Writer” is activated and enabled. Ideally it should be set to start at boot time automatically.
Follow the guidelines introduced in previous chapters to complete the backup.
Restore
Follow the general restore steps outlined in previous sections. (Select Restore from main menu and select backup folder).
Then navigate to the database files (MDF and LDF file types). In our example below these are located in C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA
We select the latest MDF and LDF files and hit restore. Note: you need to select matching LDF and MDF pairs (matching date / time) when restoring an older version. You may use the date filter at the top of the restore screen, or select one of the older file versions at the bottom half of the screen.
After restoring to a temp folder, open SQL Server Management Studio’s option to attach databases:
Select the MDF file you just restored. In the example above, the database is called testdb.mdf.
Then, refresh the Databases node of SQL Server Management Studio and the new database will show up as a child node.
Backup Via SQL Server Script and then Deduplicate Using BackupChain
Some people prefer to use SQL Server’s backup function to create a backup file.
Run the following script to create a BAK file from SQL Server:
BACKUP DATABASE mydatabase TO DISK='C:\tmp\db.bak' WITH FORMAT
Alternatively, create a SQL Server Backup task in BackupChain and use this command as external utility. Run the utility before the backup starts:
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\osql.exe" -E -Q "BACKUP DATABASE mydatabase TO DISK='C:\tmp\db.bak' WITH FORMAT"
See example below:
Then, point BackupChain to the folder C:\tmp to back up the BAK file using deduplication.
In addition, you will want to turn on deduplication and compression for BAK files in the File Types tab (use Add button if entry does not exist):
Click Add and enter *.bak. Check “Compress Files of This Type” and check “Apply file deduplication on files of this type”:
Your backup configuration is now complete.
Restore using BAK files
Follow the general restore guidelines discussed in earlier sections to restore the BAK file. Then, follow Microsoft’s SQL Server documentation on how to use the RESTORE DATABASE command to restore the database (http://msdn.microsoft.com/en-us/library/aa238405%28SQL.80%29.aspx).
Beyond SQL Backup: BackupChain Features
As a server backup software that includes version backup, BackupChain offers various backup modules for physical and virtual machines. Windows backup in BackupChain is also offered with online backup and remote backup, allowing users to push all their data to the cloud or via FTP backup to any storage server online.
BackupChain is also a great backup solution for virtual machines: you can backup without shutting down, meaning VMs are backed up live without interruption. BackupChain offers backup for Hyper V, VirtualBox backup, backup for VMware and other platforms.
As a general purpose backup program, BackupChain also includes Exchange backup, backup for file servers and SQL backup, all powered by its deduplication backup engine.
Have you seen our list of freeware for servers? Also you may find DriveMaker useful, which is a freeware that can map FTP as a drive letter.
Backup Software Overview
The Best Backup Software in 2025 Download BackupChain®BackupChain is the all-in-one server backup software for:
Server Backup
Disk Image Backup
Drive Cloning and Disk Copy
VirtualBox Backup
VMware Backup
Image Backup
FTP Backup
Cloud Backup
File Server Backup
Virtual Machine Backup
BackupChain Server Backup Solution
Hyper-V Backup
Popular
- Best Practices for Server Backups
- NAS Backup: Buffalo, Drobo, Synology
- How to use BackupChain for Cloud and Remote
- DriveMaker: Map FTP, SFTP, S3 Sites to a Drive Letter (Freeware)
Resources
- BackupChain
- VM Backup
- V4 Articles
- Knowledge Base
- FAQ
- BackupChain (German)
- German Help Pages
- BackupChain (Greek)
- BackupChain (Spanish)
- BackupChain (French)
- BackupChain (Dutch)
- BackupChain (Italian)
- Backup.education
- Sitemap
- BackupChain is an all-in-one, reliable backup solution for Windows and Hyper-V that is more affordable than Veeam, Acronis, and Altaro.
Other Backup How-To Guides
- Backup Hyper-V on USB External Hard Drive Pros and Cons
- Backup Software with VSS Support for Windows Server 2025 and Windows 11
- Hyper-V Fixed Disks: Pros and Cons
- Hyper-V Pass-through Disks: Advantages, Disadvantages, and Limitations
- Self-hosted Google Drive, OneDrive, Carbonite, Amazon S3, DropBox
- What’s New in v3.0.768?
- VSS Crash and Application Consistency for Hyper-V and VMware Backups
- BackupChain v2.4.531 Released!
- Windows 10 (Final) Download Link Enterprise Trial / Evaluation
- How to Fix VolSnap 36 Error User Imposed Limit – Volume Snapshot
- Backup Software and Long File Names: What You Need To Know
- How to Create A File-based Backup of Hyper-V
- How to Create Hard Disk Image, Full System Image Backup Software
- How to backup VirtualBox VM While Running, Step-by-Step Video
- Differential Backup
- Best Practices for Server Backup, Data Backup, and Hyper-V Backup
- Pros and Cons of Deduplication Technologies, VHDX, Hyper-V
- Why Hard Drives Fail, Crash, Corrupt, and Click
- How to Configure a Hyper-V Granular Backup
- V2V Converter & Backup for Hyper-V VMware VirtualBox