How to create MS SQL database backup?

Created:

2016-11-16 12:47:45 UTC

Modified:

2017-04-24 11:05:49 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to create MS SQL database backup?

Applicable to:

  • Plesk for Windows

Question

How to create MS SQL database backup manually?

Answer

  1. Use the SQLCMD utility.

  2. Find the host name to be used:

        "%plesk_bin%\\dbclient.exe" --direct-sql --sql="select host from databaseservers where type='mssql'"
    host
    .\\MSSQLSERVER2012

    In this case the name to use is `.\\MSSQLSERVER2012`

  3. Open cmd utility, go to the Tools\\Binn directory of the Microsoft SQL server installation:

        cd "C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn"
  4. Use the following command to backup desired database:

        SQLCMD.EXE -E -S .\\MSSQLSERVER2012 -Q "backup database sample_database to disk = 'C:\\sample_database_backup.sql'"

    where sample_database is the database name, C:\\sample_database_backup.sql is a full backup name

  5. Use SQL Management Studio . The instructions in how to backup a database can be found here .

  6. Use Plesk interface: Plesk > Domains > example.com > Backup Manager . Select a database you want to backup.

NOTE: If you want to restore database on another server download backup in Plesk and upload it on destination server through GUI in Plesk Backup Manager > Database Backup .

Have more questions? Submit a request
Please sign in to leave a comment.