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

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2018-07-18 07:04:50

netsky
Member
Registered: 2017-12-05
Posts: 12

Backup 11.0.1 free version - cron does not work (solved)

admin wrote:

(*) Please, note that this post is fairly old and that (c)XSIBackup has evolved to a next generation of (c)VMWare (c)Backup software. It follows the same design principles as (c)XSIBackup Classic, yet it's much more powerful.

You can still download (c)XSIBackup Classic, although it's older software and only compatible with (c)ESXi up to version 6.7U3

Dear Support team,

We just installed the 11.0.1 version and the test backup run without any issues.
We have setup the cron job within jobs/ directory as guided.

The cron job was confirmed to be appear in /var/spool/cron/crontabs/root file.

The backup script is as below

echo "Starting xsibackup job 001 .." >> /var/log/cron.log
/vmfs/volumes/DATA/xsibackup-11.0.1/xsi-dir/xsibackup --backup-point=/vmfs/volumes/ExtUSB/VMBackup --backup-type=all --snapshot=doquiesce --date-dir=yes
echo "Backup job completed ..." >> /var/log/cron.log


By checking the cron.log, we are able to confirmed that the cronjob started but it seems the backup had stopped immediately after started.
We run the script manually and it worked without any issues.


There is another issue with the free version.
The below command did not execute successfully. It stopped right away.
/vmfs/volumes/DATA/xsibackup-11.0.1/xsi-dir/xsibackup --backup-point=/vmfs/volumes/ExtUSB/VMBackup --backup-type=all --snapshot=doquiesce --date-dir=yes >> /var/log/cron.log

When removing the pipeline, it worked perfectly.

Would you please suggest on how to troubleshoot and fix this issue?

Last edited by netsky (2018-07-18 07:09:19)

Offline

#2 2018-07-18 10:04:15

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Backup 11.0.1 free version - cron does not work (solved)

Have you set the digit for the minutes, or you just left the asterisk?
Check this post out to learn more about ESXi cron

Offline

#3 2018-07-18 23:11:22

netsky
Member
Registered: 2017-12-05
Posts: 12

Re: Backup 11.0.1 free version - cron does not work (solved)

Yes, the cron is setup properly. I was able to confirm the message in the cron log. However, the backup process did not run as expected.

[root@esxi:~] more /var/spool/cron/crontabs/root
#min hour day mon dow command
1    1    *   *   *   /sbin/tmpwatch.py
1    *    *   *   *   /sbin/auto-backup.sh
0    *    *   *   *   /usr/lib/vmware/vmksummary/log-heartbeat.py
*/5  *    *   *   *   /bin/hostd-probe.sh ++group=host/vim/vmvisor/hostd-probe/stats/sh
00   1    *   *   *   localcli storage core device purge
0    1    *   *   *   /bin/esxi-conf-backup.sh
0       2    *   *   *   /vmfs/volumes/DATA/xsibackup-11.0.1/xsi-dir/jobs/001
*/1 * * * * '/vmfs/volumes/DATA/xsi-dir/xsibackup-cron' >> '/vmfs/volumes/DATA/xsi-dir/xsibackup-cron.log' 2>&1

Offline

#4 2018-07-19 10:37:57

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Backup 11.0.1 free version - cron does not work (solved)

Why are you keeping the old cron sytem line?

*/1 * * * * '/vmfs/volumes/DATA/xsi-dir/xsibackup-cron' >> '/vmfs/volumes/DATA/xsi-dir/xsibackup-cron.log' 2>&1

Remove it and reboot your server.
Why do you say that the backup process did not run as expected?
Have you examined the log at /vmfs/volumes/DATA/xsi-dir/conf/?
You could simply have a wrong e-mail password that prevents you from getting the report, but that would not mean the backup didn't take place. You won't know until you get familiarized with the new changes, which are not so dramatic BTW.
(c)XSIBackup Classic: changes in version 11.0.0

Offline

#5 2018-07-20 00:12:12

netsky
Member
Registered: 2017-12-05
Posts: 12

Re: Backup 11.0.1 free version - cron does not work (solved)

I checked at the time cron job started and found the message indicated that backup completed in the cron job log just few minutes after that.
Checking the backup target folder and no data there.
Also, it usually took about 1 hour for the backup job to complete.

I did check by running the job manually as well and it started without any issues.
Removing the cron job of the old version did not help to resolve the issue

Offline

#6 2018-07-20 12:01:59

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Backup 11.0.1 free version - cron does not work (solved)

admin wrote:

(*) Please, note that this post is fairly old and that (c)XSIBackup has evolved to a next generation of (c)VMWare (c)Backup software. It follows the same design principles as (c)XSIBackup Classic, yet it's much more powerful.

You can still download (c)XSIBackup Classic, although it's older software and only compatible with (c)ESXi up to version 6.7U3

Getting it to work is fairly simple, just as long as you follow the right procedure:

1 - You need a runnig crond service, right?.

The ESXi crond daemon can be picky, as it lacks any service control scripts or management mechanism, you need to manage it manually as any other linux binary, so start by making sure that it's loaded just once.

ps -c | grep -v grep | grep 'busybox crond'

If you see more than one line in the output, kill all and start it again, just once of course. Getting nervous and double firing things might work half way in Windows, but ESXi is just a bare kernel, so just execute once and verify.

/usr/lib/vmware/busybox/bin/busybox crond

Everything is explained in more detail here: https://33hops.com/xsibackup-cron-how-to.html
If you can, just reboot the server, it will produce the same effect.

You just need to get used to how this ESXi busybox cron daemon works, it's primitive but effective. In regards to how XSIBackup uses it, it's quite simple: jobs are simply called from /var/spool/cron/crontabs/root, it's in fact simpler than the old XSIBackup cron.

So, make sure that you have the entries that you want there. You can check the cron is working by just adding a line like this to your crontab at: /var/spool/cron/crontabs/root

*/1 * * * * echo "$(date)" >> /tmp/my-cron-test.txt

You should then see a line being recorded there every minute, you can use this command in a different window:

tail -f /tmp/my-cron-test.txt

2 - You need to make sure you have a line in your crontab that points to a working backup job

You already checked that your job is running, so make sure that is has the right syntax, please read:
(c)XSIBackup Classic: changes in version 11.0.0

-------

That's all, if your crond service is running and it's pointing to the right place, you got it. If your job crond is working and you get no output, then the output might not be where you think it is, just double check the .log file redirection in the last line of the job file.

Offline

#7 2018-07-24 03:10:45

netsky
Member
Registered: 2017-12-05
Posts: 12

Re: Backup 11.0.1 free version - cron does not work (solved)

I finally make it works.
I had to break down the command into multiple lines and put the exec=yes before the pipeline as written in the guide.

Thank you very much for your support!

Offline

#8 2018-07-24 12:10:25

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Backup 11.0.1 free version - cron does not work (solved)

You are describing the procedure outlined in the version documentation

(c)XSIBackup Classic: changes in version 11.0.0

To anybody else reading this post. Please, do read the product manual, release notes and change log before attempting to use the program.

Offline

#9 2021-05-24 12:20:07

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Backup 11.0.1 free version - cron does not work (solved)

Please, note this thread corresponds to an old software edition which has been deprecated. Use our latest software edition: (c)XSIBackup-DC and refer to its manual to backup your (c)ESXi VMs as of 2021

Offline

Board footer