I am struggling to configure a working cron-job for XSI Backup.
I already read and followed the instructions on (c)XSIBackup Classic: troubleshooting the (c)ESXi cron, https://33hops.com/xsibackup-cron-how-to.html and (c)XSIBackup Classic: changes in version 11.0.0 and hopefully did not do anything wrong here.
Currently the xsi-dir/conf/root-crontab file looks like
# This crontab belongs to the root user, thus it starts by root-^M # Add cron jobs to this file in the classic crond Linux way. ^M # This is an example of a backup job being run everyday at 2:00 a.m.^M # change according to your needs and run ./xsibackup --update-cron^M # min hour day mon dow command^M # 0 2 * * * "/vmfs/volumes/datastore1/xsi-dir/jobs/001" 58 12 * * * "/vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010" > /vmfs/volumes/backup/log.log 2>log2.log
for debugging purposes. I set the run to happen in about one or two minutes from my current time. As you can see below, the crontab executes the job
[root@VMdev01:/vmfs/volumes/576b9a77-3ab6f9f1-3d0f-6805ca428510/xsi-dir] grep xsi /var/log/syslog.log 2019-04-28T02:00:01Z crond: crond: USER root pid 3786984 cmd "/vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010" >/dev/null 2>&1 2019-04-29T12:52:01Z crond: crond: USER root pid 3900512 cmd "/vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010" > /vmfs/volumes/backup/log.log 2019-04-29T12:58:01Z crond: crond: USER root pid 3901132 cmd "/vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010" > /vmfs/volumes/backup/log.log 2>log2.log [root@VMdev01:/vmfs/volumes/576b9a77-3ab6f9f1-3d0f-6805ca428510/xsi-dir]
I redirect the output to the volume where the backup is made (NFS-Share) and the file log.log gets created but is empty. I also have a file xsibackup.log at xsi-dir/var/logs, but it is empty aswell
[root@VMdev01:/vmfs/volumes/576b9a77-3ab6f9f1-3d0f-6805ca428510/xsi-dir/var/logs] ls -lisah total 16 503348612 8 drwxr-xr-x 1 root root 420 Mar 5 12:23 . 453016964 8 drwxr-xr-x 1 root root 420 Mar 5 12:23 .. 507542916 0 -rw-r--r-- 1 root root 0 Mar 5 12:23 xsibackup.log [root@VMdev01:/vmfs/volumes/576b9a77-3ab6f9f1-3d0f-6805ca428510/xsi-dir/var/logs]
Running /vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010 as writte in the cron file directly on the shell works fine. The backup is created on my NFS-Datastore then.
Any ideas where the issue could be? I provide any more information gladly.
Last edited by klein0104 (2019-04-29 13:09:57)
This entry in your root-crontab is wrong:
58 12 * * * "/vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010" > /vmfs/volumes/backup/log.log 2>log2.log
It should be:
58 12 * * * "/vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010"
Use the GUI to generate the contents of your root-crontab file by going to "Manage backup jobs" => "Schedule"
thanks for the quick reply. I changed it to
22 14 * * * "/vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010"
But no change in behaviour. I still get the execution in the syslog.log, but no backup is made (I assume that as I cant find any busy process with "ps | grep xsi" and also the files on my backup NFS-share stay untouched.)
2019-05-02T14:22:01Z crond: crond: USER root pid 4138286 cmd "/vmfs/volumes/Areca_Raid10-04_DEV01/xsi-dir/jobs/010"
Regarding the GUI: Isnt the GUI part of the PRO Version? I am using XSI free.
Last edited by klein0104 (2019-05-02 14:41:43)
You are posting to XSIBackup-Pro forum, so if you are using Free version, this is not the place to post your questions.
You have edited the job files in an external editor and you have broken its page code, you can tell by the ^M at the end of every line.
My apology for posting to the wrong subforum. Thanks for the note, that explains why I cant find the post in the forum everytime and have to search my history for the actual URL .
I will have a look into the job files at /xsi-dir/jobs. However, I thought that in the tutorials it was written to use vi to edit them and thats the only editor I used. I will have a look again. Thanks for the help
PS: If it is possible, it would be nice if a moderator could move this topic to the XSI Free > General Subforum
Never mind, just as long as it's useful to other people...
Yes, you can use vi to edit the job files or any other XSIBackup related file, nevertheless, the undeniable fact is that what you pasted has been changed the page code (^M termination). Whether it's been in the paste process or before, that's something we have no epistemologic access to.
Check whether those line termiinations are present at your xsi-dir/conf/root-crontab when visualizing it on vi. If so, I would not bother much trying to find out how or denying the fact that they are there, just reinstall again.