You are not logged in.
Pages: 1
hi all,
so i have made a cronjob for xsi backup free but it doesnt work
i have tried it manually and it works fine
vi /vmfs/volumes/datastore11/xsi-dir/conf/root-crontab
/vmfs/volumes/datastore11/xsi-dir/xsibackup --time="Mon 02:00|Wed 02:00|Fri 02:00|Sun 02:00" --backup-point=/vmfs/volumes/datastore2/backup/esx02 --backup-type=running --date-dir=yes --backup-room=1000
obviously running it manually i cut out the time options
does anyone know why its not working, can i edit the actual crontab in the actual host, thats another option?
thanks,
rob
Offline
what an idiot
solved it
/vmfs/volumes/datastore1/xsi-dir/xsibackup --update-cron
Offline
Great!. The best fail at the simplest tasks ;-) we know that by experience.
Offline
mmm... doesnt seem to work, i have left it a few days and i cant see a new date folder in my "/vmfs/volumes/datastore2/backup/esx02"
but its added it to the "/var/spool/cron/crontabs/root"
/vmfs/volumes/datastore11/xsi-dir/xsibackup --time="Mon 02:00|Wed 02:00|Fri 02:00|Sun 02:00" --backup-point=/vmfs/volumes/datastore2/backup/esx02 --backup-type=running --date-dir=yes --backup-room=1000 # Added by XSIBackup
if i run it manually tho without the time option it works fine
rob
Offline
do i need to restart the host, is that why is hasnt picked up the new cron job?
EDIT - think i found the solution
/bin/kill $(cat /var/run/crond.pid)
/var/spool/cron/crontabs/root/bin/busybox crond
or is it this
/usr/lib/vmware/busybox/bin/busybox crond
Last edited by Robertkwild (2020-06-02 23:33:34)
Offline
This way of invoking the cron has been deprecated years ago:
--time="Mon 02:00|Wed 02:00|Fri 02:00|Sun 02:00"
To use the cron:
- Install it: ./xsibackup --install-cron
- Add your schedules to the root crontab at: <installation-dir>[b]/conf/root-crontab[/b]
- Update the ESXi crontab: ./xsibackup --update-cron
Offline
so is this the correct one to use on the cron?
00 02 * * 0-6/2 /vmfs/volumes/datastore11/xsi-dir/xsibackup --backup-point=/vmfs/volumes/datastore2/backup/esx02 --backup-type=running --date-dir=yes --backup-room=1000
basically every other day at 2am
ps - i would change your youtube video in how to make a cron then as this says use the time options
[url=https://www.youtube.com/watch?v=hv2JPdVjglA]Youtube video[/url]
Last edited by Robertkwild (2020-06-03 09:46:56)
Offline
That is an old video.
No, you are not doing it right it is much simpler than that.
[url]https://33hops.com/xsibackup-composing-esxi-backup-jobs.html[/url]
The above link comes out first when looking for "XSIBackup configure job" in Google
Run the job on screen to make sure it works, then just append [b]--save-job=001[/b] ([url=https://33hops.com/xsibackup-help-man-page.html#savejob]--save-job[/url])
The job will be saved as <install-dir>/etc/jobs/001
Then add the schedule to the [b]<installation-dir>/conf/root-crontab[/b] file
0 2 * * * /vmfs/volumes/datastore11/xsi-dir/jobs/001
Once you have saved the above run: ./xsibackup --update-cron=root
You are doubling figures in your cron schedule, that is not neccesary and may lead to errors. On the other side the syntax you are using for the weekday is probably too complicated for ESXi (0-6/2)
Use some simpler cron syntax, ESXi cron service IS NOT a full featured Linux cron service, it is a cut down version running from Busybox.
0-6 is equivalent to an asterisk (*) for the weekday thus you don't need anything in the weekday column.
Offline
ahhhh so esxi uses busybox a cut down version of cron, good to know
ive left out the option --save-job as im just running one cron for my backups but its good to know in future or do i need this option to add a cronjob?
atm its like this
00 02 * * * /vmfs/volumes/datastore1/xsi-dir/xsibackup --backup-point=/vmfs/volumes/datastore2/backup/esx01 --backup-type=running --date-dir=yes --backup-room=1000 # Added by XSIBackup
Offline
NO you can't do that. Jobs must be packetized into job files by employing the [b]--save-job[/b] argument. Then call the job file from the cron.
As per what we have read so far, you were a bit lost (probably our fault) in regards to which commands to use, thus we don't think you can afford to ignore --save-job, as it will ensure you are saving a correctly formated job file. Once you have done so, you may modify it manually.
Offline
i understand you Administrator, thanks, will let you know if it works
Offline
success!
0 2 * * * /vmfs/volumes/datastore11/xsi-dir/jobs/001 # Added by XSIBackup
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Current number of crond instances is 1, service seems to be running O.K.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Killed
[root@lon-p-esx02:/vmfs/volumes/5ded0efa-410c4d6a-3b7e-ac1f6bdc45fe/xsi-dir] cd /
[root@lon-p-esx02:~] cat /vmfs/volumes/datastore11/xsi-dir/jobs/001
"/vmfs/volumes/datastore11/xsi-dir/xsibackup" \
--backup-point="/vmfs/volumes/datastore2/backup/esx02" \
--backup-type="running" \
--date-dir="yes" \
--backup-room="1000" \
--backup-id="001" \
--exec=yes >> "/vmfs/volumes/datastore11/xsi-dir/var/logs/xsibackup.log"
[root@lon-p-esx02:~]
lets see if it runs
Offline
it worked!!!!!!!!!!!
Offline
Pages: 1