Back Up Tasks with Hasleo Backup Suite Command Line Interface

Hasleo Backup Suite provides a Command Line Interface (CLI) program that allows you to perform backup tasks through scripts (such as batch file, PowerShell, etc.) or cmd.exe in Windows. In the current version of Hasleo Backup Suite, the CLI only supports performing backup tasks. Support for additional functions is planned for future updates.

 

Tutorial to Use the Hasleo Backup Suite Command Line Interface (CLI)

Step 1. Run the Windows Command Prompt as administrator.

Step 2. Navigate to the bin folder under the installation directory of Hasleo Backup Suite by typing in:
cd C:\Program Files\Hasleo\Hasleo Backup Suite\bin
tips Tips: If you installed the program in a different location, enter that location instead.

Step 3. Type "BackupCmdUI.exe /?" for help, all the command and parameters of this tool will be listed as below:

Hasleo Backup Suite Command Line Tool [Version 5.0 (Build: Mar 12 2025)]
Copyright (C) 2023 Hasleo Software. All rights reserved.

/a <action> Specifies the action (tasks/run) you want to perform.
tasks: list the details of all tasks
run: run the specified backup task
/? Produce a help message.

Options for 'tasks' action:
/? Produce a help message.

Options for 'run' action:
/g <guid> Specifies the GUID of the task that you want to run. You can perform the
'tasks' operation to view the GUIDs of all tasks.
/t <type> (Optional) Specifies the backup type, it defaults to 0 if not provided.
0: full backup
1: incremental backup
2: differential backup
/s <silent> (Optional) Specifies the silent mode, it defaults to 0 if not provided.
0: non-silent mode
1: silent mode
/? Produce a help message.

Examples:
BackupCmdUI.exe /a tasks
BackupCmdUI.exe /a run /g 1E91BC35-F188-46c7-AD22-D1ED7AED3A6A /t 1

Command line interface for Hasleo Backup Suite

 

In order to uniquely identify a backup task, Hasleo Backup Suite assigns a globally unique identifier (GUID) to a task when it is created. When executing a backup task through the command line interface program, you first need to find the GUID of the task through "BackupCmdUI.exe /a tasks", and then use the GUID to execute the backup task.

 

Frequently Asked Questions

Q: What can I do with the CLI?

A: Currently, CLI only supports backup operations—you can list tasks and run specific backup tasks. Restore and clone via CLI are planned for future versions.

Q: How do I find the task GUID?

A: Run "BackupCmdUI.exe /a tasks" to list all tasks with their GUIDs. Each task has a unique identifier that identifies it in command-line operations.

Q: Can I run incremental backups from CLI?

A: Yes. Use /t parameter: /t 0 for full, /t 1 for incremental, /t 2 for differential backup. If not specified, it defaults to full backup.

Q: What does silent mode do?

A: Use /s 1 to suppress UI and run quietly in background. Use /s 0 (default) to show GUI during backup operation.

Q: Can I use this in batch scripts?

A: Yes. This is the main use case—embed CLI commands in .bat or .cmd scripts for automated backups. It works with Task Scheduler too.

Q: What happens if backup fails via CLI?

A: Exit codes indicate success or failure. Non-zero means failure. Use error handling in scripts to detect failures and take appropriate action.

Q: Do I need admin rights to run CLI?

A: Yes. Run Command Prompt as administrator for system/directory backups. For file-only backups, regular user access may suffice.

Q: Can I schedule CLI backups with Windows Task Scheduler?

A: Yes. Create a scheduled task that calls your batch script. The script runs automatically at specified times without user interaction.