How to Backup Your SQL DB

KB ID: 1471
Product: Veeam Management Pack for System Center;Veeam Smart Plug-in (SPI) for VMware;Veeam Backup & Replication;Veeam Fast SCP;Veeam ONE
Version: 20xx
Published:
Last Modified: 2014-05-20

Purpose

This is a "how to" guide on backing up your SQL DB. This is useful in cases where you have to do a quick backup before a DB edit or a backup alternative if you don't want to back up the whole server and just want to back up select information.  

Solution

I. Using SQL Server Management Studio

  1. Open Microsoft SQL Server Management Studio (May need to be installed separately)
  2. Connect to the "ServerName\Instance" of the server that has the DB you want backed up.  
  3. Expand the Databases tab to get to the DB you want to back up.  
  4. Right click the desired DB --> Tasks --> Back Up...
  5. Set "Backup Type" to "Full"
  6. Go through the rest of the General and Options tab information to set the options to what you want. 
  7. Click OK to start the Backup process.

II. Using sqlcmd

In case you do not have management studio installed, Veeam database can be collected using SQLCMD utility:

1. Check the name of the SQL instance and Veeam database in windows registry

HKEY_LOCAL_MACHINE\SOFTWARE\VeeaM\Veeam Backup and Replication\SqlDatabaseName
HKEY_LOCAL_MACHINE\SOFTWARE\VeeaM\Veeam Backup and Replication\SqlInstanceName
HKEY_LOCAL_MACHINE\SOFTWARE\VeeaM\Veeam Backup and Replication\SqlServerName

2. Open Windows Command prompt and connect to SQL instance:

SQLCMD -S (SqlServerName)\SqlInstanceName

User-added image

Note: In case you have SQL server authentication enabled you may define username using '-U' parameter

3. Back up the Veeam database:

BACKUP DATABASE SqlDatabaseName TO DISK = 'C:\VeeamDB.bak'
GO


User-added image




More Information

Alternatively you can copy the .MDF (database file) and .LDF (database temp file) to a different location.  The default path for these files are "C:\Program Files\Microsoft SQL Server\MSSQL10_50.'YourInstanceName'\MSSQL\DATA\" where "YourInstanceName" is the name of the SQL instance.  
5 / 5 (55 votes cast)

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.

Request new content

Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Orphus system