SQL Backup Master provides a simple command line interface that allows you to trigger a backup job to start.
This capability can be useful if you have advanced backup scheduling needs, in which case you can use the SQL Backup Master command line interface in conjunction with Windows Task Scheduler. Or you might elect to use the command line interface from your custom batch scripts.
Available command line arguments are explained below.
/jobName "<backup-job-name>"
This parameter is required in order to the product in command line mode. Replace <backup-job-name> with the name of the backup job you want to start. For example:
SqlBackupMaster.exe /jobName "Order database backup"
Note that the backup job name above is not case sensitive.
/backupType "<backup-job-type>"
Use this optional parameter to determine the type of backup to start. If you don't provide this parameter, a "full" backup type is assumed.
Valid backup types include "full" (full backup), "diff" (differential backup), and "log" (transaction log backup). For example:
SqlBackupMaster.exe /jobName "Order database backup" /backupType "diff"
The backup type parameter value is not case sensitive.
Command Processing
Command line calls to SqlBackupMaster.exe will start the specified backup job and exit immediately. This allows you to start multiple backup jobs in sequence, if needed, without waiting for any of them to complete.
If the backup job was started successfully by the command line interface, the process exit code will be zero (0). If the backup job could not be started for any reason, the exit code will be one (1). If you need additional details about the execution state of a backup (such as the final backup success or error state), you'll need to review backup log for that job.
Once the backup job is up and running, it will be processed just as it would if you had started it via the SQL Backup Master user interface. All settings for the job will be honored, log entries will be created, notifications will be sent, etc.
Finally, please note that it will usually be necessary to specify a fully qualified path to the SQL Backup Master executable (SqlBackupMaster.exe). For example:
"C:\Program Files (x86)\Key Metric Software\SQL Backup Master\SqlBackupMaster.exe" /jobName "Order database backup" /backupType "diff"
If the full path contains spaces (as it does in the example above), you'll need to surround it with quotes.