#1 2019-02-11 01:36:11

lfkl
Member
Registered: 2019-02-11
Posts: 2

V11.0.1 SMTP parameters

Hello,

I'm a bit confused with the way smtp parameters should be configured on the job file.
Here's our job file :

"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=XSITools:z \
--certify-backup=yes \
--backup-point=/vmfs/volumes/Backup/COMPTASRV/$( date +%Y%m'00000000' ) \
--backup-type=custom --backup-vms="COMPTASRV" \
--backup-how=Hot \
--remote-xsipath=/vmfs/volumes/datastore1/xsi-dir \
--use-smtp=2 \
--mail-from=myemailadress@xxxx.xxx.xx --mail-to=myemailaddress@xxxx.xxx.xx --smtp-srv=smtp.sendgrid.net  --smtp-port=587 --smtp-usr=myuserlogin --smtp-pwd=mypassword  --smtp-sec=STARTTLS \
--backup-id=001 \
--description="XSITools backup of production VMs" \
--on-success="backupId->002" \
--on-error="backupId->002" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log"

Bu we have this error on the log after the CRON job is succesfully executed:

2019-02-11T03:18:09|  No errors detected in backup
---------------------------------------------------------------------------------------------------------------------------------
Using stored SMTP server info...
Found conf/smtpsrvs file...
[0;31mError: cannot determine the e-mail server credentials, each smtpsrvs entry requires seven fields, please check syntax[0m


Of course there's something wrong with the smtp parameters that I did but I'm not sure what it is. (shall we remove the line "--use-smtp=2 \") ? shall I put every argument on a different line ?
Those parameters are working with all versions below 11 :
--mail-from=myemailadress@xxxx.xxx.xx --mail-to=myemailaddress@xxxx.xxx.xx --smtp-srv=smtp.sendgrid.net  --smtp-port=587 --smtp-usr=myuserlogin --smtp-pwd=mypassword  --smtp-sec=STARTTLS \

I've read this article about changes with version 11 but still can't find the right syntax.
https://33hops.com/xsibackup-free-11-th … anged.html

Can you please help ? Thank you for your assistance!

Offline

#2 2019-02-11 15:15:41

admin
Administrator
Registered: 2017-04-21
Posts: 686

Re: V11.0.1 SMTP parameters

Add your SMTP servers in the conf/smtpsrvs file and test them with this command:

./xsibackup --check-smtp=some@email.com --use-smtp=N

Where N is the sequence number in the first field of the conf/smtpsrvs file.

Then use it in your backup job by invoking the SMTP server this way

... --mail-to=some@email.com --use-smtp=N

Offline

#3 2019-02-18 07:36:29

lfkl
Member
Registered: 2019-02-11
Posts: 2

Re: V11.0.1 SMTP parameters

Thank you very much, it worked almost like a charm.

Here's my job file 001

# This is a backup job file example. It starts with the path to your
# xsibackup file and ends with the redirection to the log file. Please
# do make sure that you keep first and last lines, changing paths to
# match your working environment.

"/vmfs/volumes/datastore1/xsi-dir/xsibackup" \
--backup-prog=XSITools:z \
--certify-backup=yes \
--backup-point=/vmfs/volumes/Backup/COMPTASRV/$( date +%Y%m'00000000' ) \
--backup-type=custom --backup-vms="COMPTASRV" \
--backup-how=Hot \
--remote-xsipath=/vmfs/volumes/datastore1/xsi-dir \
--use-smtp=2 \
--mail-to=email1@lfkl.edu.my \
--mail-to=email2@lfkl.edu.my \
--backup-id=001 \
--description="XSITools backup of production VMs" \
--on-success="backupId->002" \
--on-error="backupId->002" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log".

and my smtpsrvs file :

# [TITLE] = SMTP Server
# You can add as many SMTP servers as you want
# Columns are separated by colons as described below
# One server per line pledging to the following format (please, do note that the server IP or FQDN and port are separated by a colon)
# ORDINAL(integer);--smtp-srv(IP or FQDN):--smtp-port;--mail-from;--smtp-usr;--smtp-pwd;--smtp-auth(none|anystring);--smtp-sec(TLS|anystring);--smtp-delay(0-4 sec) 
# Do not parse any --smtp-delay unless you need it 0 is OK, only first 8 fields are mandatory
# Example
# 1;smtp.gmail.com:465;youremail@gmail.com;youremail@gmail.com;Y0urpassw0rd;yes;TLS;0
2;smtp.sendgrid.net:587;email1@lfkl.edu.my;"username";"password";yes;STARTTLS;0
.

The email is correctly sent from email1@lfkl.edu.my but only email2@lfkl.edu.my receive it, not email1@lfkl.edu.my.
Is there something I incorrectly setup on the job file?

Offline

Board footer