How to backup and restore SQL Server on Linux

In this article, we will describe how to create a backup of a SQL Server that is installed on Linux.

How does SQL Server create a backup?

You can create a SQL Server backup by running the T-SQL command BACKUP DATABASE.This command saves the backup file to a specified directory. SQL Server backups are created quickly because it requires just copying data from the database files to the backup file.

When creating a backup, you do not need to stop SQL Server or switch it to single-user mode, and the database continues to work as usual during this operation.

Read more

How to backup remote SQL Server database using SqlBak

With the help of SqlBak, you can backup your remote SQL Server databases according to your schedule. A standard BACKUP DATABASE command doesn’t work on a remote SQL Server — only scripts can be generated. If there is a choice between script generation or performing backups in *.bak files, it is always recommended to run the standard BACKUP DATABASE command to get *.bak files. Scripts have some drawbacks: they are larger and do not support differential and transaction log backups. A more detailed explanation about remote backups can be found in the following blog post.

Read more

How to backup and restore Amazon RDS SQL Server

Amazon RDS SQL Server is a cloud database from Amazon. The way RDS SQL Server performs backups is the main difference between this and the classic SQL Server. It offers the following: snapshots, restore point-in-time, Export Data-tier Application and native backup to S3 (instead of native T-SQL BACKUP DATABASE construction).

Read more

MS SQL Server DBMS – /bin/sh: 1: /opt/mssql-tools/bin/sqlcmd

If you get the following error message during SqlBak set up on Linux or during a backup job:

MS SQL Server DBMS – /bin/sh: 1: /opt/mssql-tools/bin/sqlcmd

it means that SqlBak app could not find the path to the msql executables. By default, SqlBak searches for mssql files in the /opt/mssql-tools/bin/sqlcmd directory.

Read more

SQL Server backup format: BAK vs SQB

SqlBak creates backups in the so-called .bak format, while RedGate’s product stores backups in .sqb format. What’s the difference?

Usually, database backup files with .bak extension contain data in the standard Microsoft Tape Format (MTF)  used by  Microsoft itself as well as many backup tools for the Microsoft Windows platform. Many third-party SQL Server backup products including SqlBak and SQLBackupAndFTP produce backups in this format as well.

Files with .sqb extension contain backups in RedGate’s proprietary format. You would need to use some special utilities if you want them to be converted into MTF. Let’s learn more about Microsoft Tape Format (MTF) and SQL Backup format from Red Gate.

Read more