SqlBak-CLI
SqlBak-CLI is a free command-line utility that backs up SQL Server (MSSQL) and MySQL 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
- Creates full, differential, transaction log backups for Microsoft SQL Server and full for MySQL.
- Compresses backups
- Sends backups to cloud storage
- Removes obsolete backups from cloud storage
- 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:
- Downloads a backup from storage
- Unzips the backup
- Restores the backup
If a differential or transaction log needs to be restored, then SqlBak-CLI will download the entire backup chain 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 B2
Databases
All versions of SQL Server, starting from 2008, MySQL Version: 5.6, 5.7, 8.0 and all MariaDB versions starting from 10.2 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:
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.
Support
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.
Adaptivity
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.
Roadmap
In the near future, the following features will be supported:
- PostgreSQL Server backup/restore
- MySQL incremental backups (via binary logs)
- Automatic email notification
- 7zip compression
And also many more. Send us the features you are missing.
Useful links
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, MySQL and PostgreSQL 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.