Last updated on Monday 28th of February 2022 08:52:48 PM
©XSIBackup-Free 11: things that have changed
Please note that this post is relative to old deprecated software ©XSIBackup-Classic. Some facts herein contained may still be applicable to more recent versions though.
For new instalations please use new ©XSIBackup which is far more advanced than ©XSIBackup-Classic.
The same way we have changed some core components of XSIBackup-Pro, some of these changes have been ported to the free version, except the GUI, which will remain as the main value added feature of the Pro version in the future.
Before reading anything else, you must know that all XSIBackup-Free arguments and values remain the same, so you won't need to learn anything new. What changes are just some placements and procedures.
These changes consist in the following:
- The xsibackup-cron file has been deprecated, now jobs are scheduled in a crontab file inside the xsi-dir/conf directory. Every time you make a change to the xsi-dir/conf/root-crontab file, you need to invoke the --update-cron argument to have those changes copied to the ESXi corresponding crontab.As said, the arguments and values remain exactly the same, so, how do I place them into the backup job files?
We have modified the way you structure data for better readability, now each argument must exist in a line by its own followed by a "\" backslash character.
The following is an example of a backup job file:
--backup-point=/vmfs/volumes/backup3/$( date +%Y%m'00000000' ) \
--description="XSITools backup of production VMs" \
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log" 2>&1
In the above example, the --backup-id=003, so the file must be named jobs/003. As you can see, a new argument is introduced: --description, there you can enter whatever longer description you wish, up to a maximum of 40 characters consisting in letters, numbers and spaces and nothing else.
The job must start with the path to the xsibackup file and be closed by the redirection to the log file. All other arguments are placed in between.
--exec=yes >> "/vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log 2>&1"
Once you have created your job, you need to schedule it. This is where ©XSIBackup-Free 11 will make the difference in regards to previous versions. You will use a classical Linux cron syntax, like the following:
#min hour day mon dow command
0 2 * * * "/vmfs/volumes/datastore1/xsi-dir/jobs/001" > /dev/null 2>&1
In the example above job 001 is executed every day at 2:00 o'clock.
The contents of the last example should be placed inside the xsi-dir/conf directory as xsi-dir/conf/root-crontab. After doing this, you just invoke the --update-cron argument alone:
This will take the contents of the xsi-dir/conf/root-crontab file and place them into the /var/spool/cron/crontabs/root file, which will be the real ESXi crontab invoked by its crond service.
Why crossing the river to get water?, can't I edit the /var/spool/cron/crontabs/root file directly?
You can, but if you do, changes won't be persistent across reboots. When you install the ©XSIBackup cron system by invoking
You are adding a line to the /etc/rc.local.d/local.sh file that will in turn call --update-cron on every reboot, making sure thus, that all xsi-dir/conf/root-crontab contents are copied again to the /var/spool/cron/crontabs/root file.
How do I know if my crontab syntax is O.K.?
©XSIBackup-Free does not contain any syntax validator, so, just make sure that you have 5 numbers or asterisks and a path to an executable job file on each crontab line. ©XSIBackup takes care of making sure all xsi-dir/jobs files are made executable everytime you call it.
What about my job files?
As always, execute them in the command line before adding them to the crontab. There are different ways to do so:
- Invoke the job file directly and tail -f the log file (/vmfs/volumes/datastore1/xsi-dir/jobs/001 & ; tail -f /vmfs/volumes/datastore1/xsi-dir/var/logs/xsibackup.log)