How to manually backup a SQL DB

KB ID: 1471
Published: 2012-01-06
Last Modified: 2022-04-08
Languages: IT | FR
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please try again later.

Purpose

This article documents how to manually backup a Microsoft SQL Database.
 

Veeam Database Location Details

This section documents how to locate the SQL databases for Veeam products.

  • Veeam Backup & Replication and Veeam Cloud Connect
    • If the software is installed, open the Veeam.Backup.DBConfig.exe utility.
      While the tool is usually used to change which database is used, initially, it will show you the currently configured database connection details.
    • Alternatively, check the following registry values in the following key:
      HKLM\SOFTWARE\Veeam\Veeam Backup and Replication\
      • SqlServerName
      • SqlInstanceName
      • SqlDatabaseName
  • Veeam Backup Enterprise Manager
    • If the software is installed, open the Veeam.Backup.DBConfig.exe utility.
      While the tool is usually used to change which database is used, initially, it will show you the currently configured database connection details.
    • Alternatively, check the following registry values in the following key:
      HKLM\SOFTWARE\Veeam\Veeam Backup Reporting\
      • SqlServerName
      • SqlInstanceName
      • SqlDatabaseName
  • Veeam Service Provider Console
    Current SQL Server Connection settings can be found within the Web UI, under:
    Configuration > Settings > SQL Server Connection
  • Veeam ONE
    • If Veeam ONE is installed, open the Veeam ONE Settings Utility to view the current SQL Server settings.
    • Alternatively, check the following registry values in the following key:
      HKLM\SOFTWARE\Veeam\Veeam ONE Monitor\db_config
      • host
      • db_name
         

Solution

Compress SQL Backup Before Attaching to Case

SQL Backup files, by default, are not compressed. Even when compression is enabled during the SQL Backup creation, it is not as effective as third-party compression tools.

To save bandwidth, compress SQL Backups using one of the following compression formats before uploading to a support case:

  • .zip
  • .7z
  • .rar
Below are details on three different methods to generate a SQL Backup file.

Method 1: PowerShell

*This PowerShell cmdlet is part of a module that is installed with SQL. If SQL is not installed on the machine where the cmdlet is executed, the command will fail.

Run the following command, filling in SQL connection information and output destination:

Backup-SqlDatabase -ServerInstance "ServerName\InstanceName" -Database "DBName" -BackupFile "C:\Temp\DBBackupFilename.bak"
powershell output example
Example using PowerShell

Method 2: SQL Server Management Studio

  1. Open Microsoft SQL Server Management Studio (May need to be installed separately)
  2. Connect to the ServerName\Instance hosting the Database.
  3. Expand the Databases section.
  4. Right-click on the desired DB, then from the context menu select Tasks > Back Up...
tasks backup
  1. Set Backup Type: to Full
  2. Set the output to a single file on disk.
    (You may need to click remove first, then click add to specify an output location on disk.)
Full backup to single file on disk
  1. Click OK to start the Backup process.

Method 3: sqlcmd

*sqlcmd is an application that is installed with SQL. If SQL is not installed on the machine where the command is executed, sqlcmd will not exist, and the command will fail.

Run the following command, filling in SQL connection information and output destination:

SqlCmd -E -S ServerName\InstanceName -Q "BACKUP DATABASE [DBName] TO DISK='C:\Temp\DBBackupFilename.bak' WITH STATS"
SQLCmd Example
Example using SqlCmd

More information

For more information on how we process the collected data, please visit: vee.am/processing_of_personal_data
Click here to send feedback regarding this KB, or suggest content for a new KB.
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Spelling error in text

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please try again later.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please try again later.