552 - Linux Agent email notification command-line setup

Modified on Mon, 21 Jul at 1:06 PM

Background

The Redstor Pro Agent supports email notifications using SMTP on Linux. While there is a dialog for configuring the settings in a Linux-with-GUI environment, the command-line is needed if no GUI is available.

pic1.jpg

Settings

  1. To configure the plugin, navigate to the /usr/share/a5backup directory and run the commands in the table below as the superuser.
  2. Prefix all commands with "a5backup-cli :settings set", for example:
    • a5backup-cli :settings set notify.mail=true
  3. Restart the backup service using "service a5backupd restart" when complete.

Note: Make sure no backup or restore is running before making changes.

GUI SettingCommand-line equivalent
Use Email Notificationnotify.mail=true|false
Notify me when a backup failsnotify.mail.fail=true|false
Failure Messages Subjectnotify.mail.fail.subject={Subject Text}
Note: To include spaces in the subject, edit the notify.mail.fail.subject line in the a5backup.properties file.
Notify me after a successful backupnotify.mail.success=true|false
Success Messages Subjectnotify.mail.success.subject={Subject Text}
Note: To include spaces in the subject, edit the notify.mail.success.subject line in the a5backup.properties file.
Append the subject line with the following options and messagenotify.append.subject=true|false
Append Warnings checkboxnotify.append.warnings=true|false
Append Errors checkboxnotify.append.errors=true|false
Append Suffix Textnotify.append.suffix={suffix text}
E.g. "encountered, please check log."
Email To Addressnotify.mail.tofield={email address}
Email From Addressnotify.mail.fromfield={email address}
SMTP Servernotify.smtp.server={SMTP Server hostname or IP}
Note: Enter host:port to specify an alternate port.
Enable STARTTLSnotify.smtp.starttls=true|false
My SMTP server requires authenticationnotify.smtp.auth.required=true|false
User namenotify.smtp.auth.username={SMTP username}
Passwordnotify.smtp.auth.password={SMTP password hash}
Note: The password hash can be copied from the a5backup.properties file of another machine with the email notification plugin configured to use the same credentials.
Attach filesnotify.attach.log=true|false
Attach summary, warnings and errors OR entire lognotify.attach.summary=true for summary
notify.attach.summary=false for entire log
Attach backup selection reportnotify.attach.selection=true

 

Examples

For example, to set the options as per the screenshot above, use the following commands:

a5backup-cli :settings set notify.mail=true

a5backup-cli :settings set notify.mail.fail=true

a5backup-cli :settings set notify.mail.success=true

No configuration is needed for the subject for either success or failure as the defaults will be used.

 

a5backup-cli :settings set notify.append.subject=true

a5backup-cli :settings set notify.append.warnings=true

a5backup-cli :settings set notify.append.errors=true

No configuration is needed for warnings and error message suffix as the default will be used.

 

a5backup-cli :settings set notify.mail.tofield=admin@yourdomain.com

a5backup-cli :settings set notify.mail.fromfield=backup@yourdomain.com

a5backup-cli :settings set notify.smtp.server=smtp.yourdomain.com

a5backup-cli :settings set notify.smtp.starttls=true

a5backup-cli :settings set notify.smtp.auth.required=true

a5backup-cli :settings set notify.smtp.auth.username=user

a5backup-cli :settings set notify.smtp.auth.password=abcdef1234\=\=

(Enter the valid hash value from another machine as described above)

a5backup-cli :settings set notify.attach.log=true

a5backup-cli :settings set notify.attach.summary=true

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article