How to create MS SQL database backup

Refers to:

  • Plesk 11.5 for Windows
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows
  • Plesk 9.x and below for Windows
  • Plesk 10.x and below for Windows

Created:

2016-11-16 12:47:45 UTC

Modified:

2017-01-22 07:16:36 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to create MS SQL database backup

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 full backup name
  5. Use SQL Management Studio . Please find the instructions how to backup database here .

  6. Use Plesk GUI: Subscriptions -> domain.tld -> Websites & Domains -> Backup Manager -> Database Backup. Select 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.