Link Search Menu Expand Document

SqlBak-CLI documentation


SqlBak-CLI is a free command-line utility that backs up SQL Server databases, sends them to cloud storage and restores the backups when needed. SqlBak-CLI is a simplified command line version of the SqlBak service.

SqlBak-CLI is currently in beta testing.

Main Features

SqlBak-CLI supports both backup jobs and restore jobs.

Backup Job

  1. Creates full, differential and transaction log backups
  2. Compresses backups
  3. Sends backups to cloud storage
  4. Removes obsolete backups from cloud storage
  5. Sends email notification of success

Restore Job

A restore job automatically restores the backups created by SqlBak-CLI. A restore job runs in the following way:

  1. Downloads a backup from storage
  2. Unzips the backup
  3. Restores the backup in SQL Server

If a differential or transaction log needs to be restored, then SqlBak-CLI will download the entire backup set required for the restore.

Supported platforms, storage locations and databases

Operating Systems

SqlBak-CLI is a cross-platform utility that does not require any dependencies. All popular Linux distributions (Ubuntu, CentOS, Debian, etc.) are supported, as well as all versions of Windows and Windows Server.

Storage locations

  • Local folder
  • Shared folder (SMB protocol)
  • FTP
  • SFTP (transfer over SSH)
  • Backblaze


All versions of SQL Server, starting from 2008, are supported.

SqlBak-CLI Benefits

Simplicity, but not primitive

To configure SqlBak-CLI, a JSON file with a job description should be created. Here’s an example of how to backup all databases in a shared folder:

	  "databases": [ "DataOne" ]

There are many different settings in SqlBak-CLI: from the level of compression to the rate limit when transferring to FTP. All of these settings allow customizing a job as needed. But in most cases, the default value is fine.


We officially support SqlBak-CLI. Our main products are SqlBak and SqlBak-CLI, which have a common code base, so we are interested in fixing bugs and adding new features.

If you have any problems with our software or have any thoughts on how to improve it, please feel free to contact us.


SqlBak-CLI is a console utility. It can be easily built into existing maintenance scripts or scheduled to run via cron jobs or the Windows Task Scheduler.

0 */24 * * * sqlbak-cli run-backup --job-settings='~/backup-settings/db-backup.json'


In the near future, the following features will be supported:

  1. MySQL Server backup/restore
  2. PostgreSQL Server backup/restore
  3. MySQL incremental backups (via binary logs)
  4. Automatic email notification
  5. 7zip compression

And also many more. Send us the features you are missing.

Start with the Get Started section as there are simple instructions on how to backup and restore via SqlBak-CLI.

If you prefer to use an app with a good UI, then take a look at our other two products:

  • SQLBackupAndFTP - the original SQL Server backup utility, with over a million installations since 2008.
  • SqlBak - an agent-based backup service for centralized backup management across multiple servers.

More examples configuring and using SqlBak-CLI.