You can trigger backup jobs through the command-line interface (CLI). You can trigger a scheduled backup for MS-SQL backup sets using CLI. Unlike Backup Now, the command-line utility provides a flexibility to perform a full, differential, or a log backup any number of times.
This feature is available on Windows Server Phoenix agents released after October 7, 2019.
Before you trigger a backup, note the following:
- The command-line utility is supported only for the configured MS-SQL backup sets.
- You must configure the MS-SQL resource, such as the standalone instance or availability group, for backup and define the backup schedule in the backup set.
For example, the log backup can only be triggered if it is enabled in the backup policy associated with the MS-SQL resource.
- You cannot trigger a backup of a node from the other nodes of the Availability Group (AG). You can trigger the backup only from the node where the backup is scheduled to run.
- For the AG backup set, the backup can be triggered from any of the nodes in the AG.
The trigger_backup utility is supported only for the MS-SQL resources; instance and availability group. To run the trigger_backup command from the CLI, use the following format:
PhoenixControl trigger_backup <service_name> <backup_type> <resource_name> <resource_type> <backupset_name>
- service_name indicates the type of the backup service. It must be 'sql'.
- backup_type indicates the type of the backup option. It must be 'full', 'diff', or 'log'.
- resource_name indicates the name of the standalone instance or availability group to back up.
- resource_type indicates the type of the resource to back up. It must be 'instance' or 'ag'.
- backupset_name indicates the backup set for which you want to run a backup.
Phoenix executes maximum two backup jobs simultaneously that you trigger using the CLI, irrespective of the number of the ongoing scheduled backup jobs. When a backup job is triggered from the CLI, the progress log displays the "Backup job triggered from command line" message. On successful trigger of the backup job, the CLI responds with the "Backup job successfully triggered" message as shown in the following screenshot.