©XSIBackup-Free: Free Backup Software for ©VMWare ©ESXi

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 Re: General matters » Extended XSIBackup crontab help [Resolved] » 2018-03-21 15:15:34

tim

If nothing is being logged then there might be a syntax error in your code (that's what I found when I had syntax errors). Try putting

echo "test"

or something similar early in your file and see if it's written to the log. If not, then you may have a syntax error. Comment out code until you find the offending line and then focus on that.

You can also try checking the /var/log/syslog.log for errors there.

Although this is related to the extended crontab backups, it's not quite related to my issue. You might be better off creating a new forum post.

#2 Re: General matters » Extended XSIBackup crontab help [Resolved] » 2018-03-21 13:34:56

tim

Thank you for your reply. With your assistance I was able to resolve the issue.

admin wrote:

You have totally rewritten our example, I'm sorry sir but we don't correct code here.

I worked on this for quite a while, looked at logs, read the help man page, searched your blog posts and searched the forums. I thought the next logical step was to ask for assistance and felt that the support forum was the appropriate place for that? I had mentioned the code part worked as expected (it writes "test" to the log at the desired time). The only line that I needed help with was the one that actually executes xsibackup. In retrospect, I probably should have used the code in the blog post example and just substituted the echo command for my xsibackup command to help reduce distractions to the actual problem.

admin wrote:

On the other side, you are missing some arguments in your XSIBackup job: --backup-prog being the most important one.

According to the documentation, --backup-prog has a default value of vmkfstools for datastore backups, which is my desired value.

admin wrote:

On addition XSIBackup will expect the job to include a --time argument when called from the cron, thus you should add the directive --exec=yes to your job

Thank you, adding --exec=yes resolved the issue. I do not see this directive listed in help man page or in the last few cron related blog posts. Now that I know what to look for, I did find it in this blog post. I kindly ask that the --exec directive be included to the help man page to help others in the future.

admin wrote:

I suggest that you try your command in the command line before using it.

I apologize for forgetting to mention that I did run it from the command line and when I do so, it works as expected (it just seems like such a natural thing to do that I didn't think of including that info).

#3 General matters » Extended XSIBackup crontab help [Resolved] » 2018-03-20 15:17:51

tim
Replies: 8

Hello,

I'm following the instructions found in this blog post. I would like to backup my VMs just once per month, on the given day and time if the day of the month is between the 17th and 23rd. I have tested the schedule by adding the following in my xsibackup-cron file:

run_this_at="Tue 15:07"
current_day_of_month=$(date +%d)

if [ "$run_this_at" != "" ]
then
    if [ "$run_this_at" == "$( date +"%a %H:%M" )" -a $current_day_of_month -ge 17 -a $current_day_of_month -le 23 ]
    then
        echo "test"
    fi
fi

This works as expected and the word test can be found in the xsibackup-cron.log.

I then expanded the code above to try and execute xsibackup. Here's the updated xsibackup-cron file:

run_this_at="Tue 15:07"
current_day_of_month=$(date +%d)

if [ "$run_this_at" != "" ]
then
    if [ "$run_this_at" == "$( date +"%a %H:%M" )" -a $current_day_of_month -ge 17 -a $current_day_of_month -le 23 ]
    then
        echo "test"
        /vmfs/volumes/datastore1/xsi-dir/xsibackup --backup-point="/vmfs/volumes/backups" --backup-how=cold --backup-type=custom --backup-vms="fw2"
    fi
fi

Again, "test" is logged in xsibackup-cron.log at the desired time. However, the "fw2" VM is not backed up and nothing else is written in the log after "test".

Can you please let me know what I'm doing wrong? I'm not very familiar with bash scripts and am probably just missing something small.

Thanks!

Edit: Sorry, I just realized that I was in the Pro forum. This should have been posted in the free forum. Can you please move it for me?

#4 Re: General matters » xsibackup free 10.30.0 - errors detected in backup job!! but no errors » 2018-03-15 21:24:35

tim

Please try running the following from the xsi-dir:

cat xsibackup-cron.log | grep error

You can also try checking the .ERR-* file in the same directory to see if it contains more details.

This may be related: [https://33hops.com/viewtopic.php?pid=804]backupConfig: not found when running cron job[/url]

#5 General matters » backupConfig: not found when running cron job » 2018-03-15 21:18:16

tim
Replies: 4

Hello,

I have set up a cron job. The job runs and I received an email with the following in the subject: "✖ XSIBACKUP errors detected in backup job!!". There are no details in the email about the error and the backups appear have been created as expected.

I checked for errors by running the following:

cat xsibackup-cron.log | grep error

This was returned:

Tip: no chained backups scheduled, set --on-success and/or --on-error arguments to chain a backup

This is just a tip and not an error, but the word error is included in the text.

I checked the .ERR file and this is what's there:

/vmfs/volumes/datastore1/xsi-dir/xsibackup: line 1: backupConfig: not found
<span class=errr>[ Thu Mar 15 20:45:34 UTC 2018 ] <b>ERROR</b> (BAKESXCF), details Error: backing the ESXi host config to /vmfs/volumes/backups, details: </span><br />

I'm not sure what backupConfig is or how to resolve this issue and would appreciate some help with this.

I am using XSIBACKUP-FREE 10.3.0 on VMware ESXi 6.0.0 build-3620759.

Regards,
Tim

Possibly Related: [https://33hops.com//viewtopic.php?id=177]xsibackup free 10.30.0 - errors detected in backup job!! but no errors[/url]

Board footer