Link Search Menu Expand Document

SqlBak-CLI documentation

Source Section

In the source section in the backup job settings file, the data for a database connection is specified.

{
	"type": "<database type>",
	...
}

The type of object for which the connection should be established determines the fields that should be completed in this section. The object type is specified in the type field. For now, only Microsoft SQL Server can be specified as a data source.

type

An object type that should be backed up.

VALUES:

  • mssql – Microsoft SQL Server. More information about the settings for SQL Server connection can be found here.
  • mysql – MySQL or MariaDB. More information about the settings for SQL Server connection can be found here.

new DBMS types will be added in the future.

Examples

Settings for a local SQL Server connection to backup two databases: DataOne and MediaOne:

...

"source": {
	"type": "mssql",
	"data_source": ".",
	"is_integrated_security": false,
	"trust_server_certificate" : true,
	"user_name": "sa",
	"user_password": "secret-password",
	"databases": { "DataOne", "MediaOne" }
}

...

Backup of all non-system MySQL databases.

...

"source": {
	"type": "mysql",
	"host": "localhost",
	"user_name":"root",
	"user_password": "**********",
	"database_types":[ "mysql_custom" ]
},

...

There are more examples in the samples section.


Table of contents