agent

agent

This command manages the connection between the backup agent and SqlBak.com. If used without any parameters, it will display the current connection status:

sqlbak agent

Subcommands

connect

Connects the backup agent to SqlBak.com.

Syntax:

sqlbak agent connect --secret-key=ask_XXXXXXXXXXXXXXXXXXXX --server-name=my-server-name --allow-add-index-to-name=Y

Parameters:

--secret-key=<Registration Keys>  – the registration key from your SqlBak account’s Keys page or the download page.

--server-name=my-server-name – the server name as it will appear on your SqlBak dashboard. If omitted, the system hostname will be used by default.

--allow-add-index-to-name=Y\N – since each server name on SqlBak must be unique, this flag determines what to do if the specified name is already taken:

  • Y – if the name already exists, a numeric suffix will be added to make it unique (default behavior).
  • N – the operation will fail if a server with that name already exists.

info

Reads the Agent information.

Syntax:

sqlbak agent info

This subcommand displays the current Agent connection status and information, including the Agent name, connection status, and account details.

disconnect

Removes the connection between the backup agent and SqlBak.com.
⚠️ Note: This action deletes all backup jobs and removes the server from the dashboard.

Syntax:

sqlbak agent disconnect

Parameters:

--confirm – specifies whether confirmation is required before performing the operation. Valid values are:

  • Y – ask for confirmation before performing the operation
  • N – do not ask for confirmation (recommended for use in automated scripts)

pause

Puts the backup agent into pause mode. While paused, backup jobs will not be executed, but the server will remain visible on the dashboard. This is useful for temporary maintenance periods.

Syntax:

sqlbak agent pause

Parameters:

--confirm – specifies whether confirmation is required before performing the operation. Valid values are:

  • Y – ask for confirmation
  • N – no confirmation prompt (recommended in scripts)

--cancel-jobs– specifies whether currently running jobs should be interrupted immediately:

  • Y – cancel currently running jobs immediately
  • N – allow running jobs to complete

resume

Resumes operation by taking the agent out of pause mode and returning it to normal working state.

Syntax:

sqlbak agent resume

Parameters:

--confirm – specifies whether confirmation is required before performing the operation. Valid values are:

  • Y – ask for confirmation
  • N – no confirmation prompt (recommended in scripts)