Link Search Menu Expand Document

SqlBak-CLI documentation

Backup Job Specification

Backup job, what is it?

A backup job is a task that the application performs. This task does the following:

  1. Backup creation
  2. Backup compression
  3. Sending backup to storage
  4. Searching and deleting obsolete backups

The information needed to complete these steps is described in a special JSON file that must be passed as a parameter to the --job-settings argument of the run-backup command:

sqlbak-cli run-backup --job-settings="~/backup/job.json"

Top-level elements

{
	"job_name": <String>,
	"temp_folder": <String>,
	"backup_procedure_order": <backup_all_compress_send, backup_one_compress_send>,
	"source": { <Source settings> },
	"compression_settings": { <Compression settings> },
	"storages": [
		{ <Destination settings> },
		…
	]
}

Mandatory

source

Connection settings for a database that should be backed up.

More details

compression_settings

Compression settings such as compression ratio and compression algorithm.

More details

storage locations

The list of storage locations to which the backup will be sent. Multiple storage locations can be used. In addition to the connection settings, a time period for storing backups can be set.

More details

Optional

backup_procedure_order

The order of operations in a backup job.

POSSIBLE VALUES:

backup_all_compress_send backup all databases -> compress all backups -> send to storage

backup_one_compress_send backup one database -> compress the backup -> send the backup to storage -> repeat

job_name

The name of the backup job. Displayed in the log.

temp_folder

Path to a temporary directory. If this path is not specified, the paths specified in the sqlbak-cli-path.json file in the application’s installation directory are used.

Examples

See examples section


Table of contents