Registered users
Linkedin Twitter Facebook Google+

In order to improve user's experience and to enable some functionalities by tracking the user accross the website, this website uses its own cookies and from third parties, like Google Analytics and other similar activity tracking software. Read the Privacy Policy
33HOPS, IT Consultants
33HOPS ::: Proveedores de Soluciones Informáticas :: Madrid :+34 91 663 6085Avda. Castilla la Mancha, 95 - local posterior - 28700 S.S. de los Reyes - MADRID33HOPS, Sistemas de Informacion y Redes, S.L.Info

<< Return to index

XSIBACKUP ::: Advanced cron, custom variables

Note (2017-05-10): you can still use this very same technique to assign any variables that you want, in any case, the examples are a bit outdated, as since version 9 XSIBACKUP-PRO counts with an SMTP server panel where you preconfigure any information about outcoming e-mails.

As we have stated many times before, XSIBackup has been designed to be flexible, so that you can integrate it in other systems, no matter what their aim may be.

One simple example of this would be the use of custom variables in the xsibackup-cron file. Why would you want to do that?. Let's say that you will be sending your e-mail reports through a single e-mail account, that'd be very natural. You might not want to write down the e-mail server, the e-mail from, to, username and password for every backup job. Thus it would be of great help to have all this values stored in variables and use those variables to reference those values accross the xsibackup-cron file.

The aim is simple, right?. In fact it is so simple that you can do it right in the very same xsibackup-cron file. It's O.K., and that will work, but only with XSIBACKUP-FREE and also with XSIBACKUP-PRO, just as long as you are not chaining backups. We will offer both solutions here:

SIMPLEST SCENARIO, no chained backups

This case is very simple, you just have to write down the variables with whatever names you want and asign them values that will be used further down in the xsibackup-cron.

Not much more to say about this kind of variable substitution but taking care of not commiting syntax mistakes. This will just assign values to this vars and use them in the execution context of the xsibackup crontab (xsibackup-cron).

XSIBACKUP-PRO with chained backups

In this case the latter will only work for the first backup job in the chain. Why?, because it is the only backup job that gets fired from within the crontab context. The subsequent backups will get fired from XSIBACKUP-PRO execution context, and thus, those variables created in the crontab file will be empty, to be more precise: they will not exist.

To overcome this situation, and also to extend XSIBACKUP-PRO capabilities, from version 6.0.8, XSIBACKUP-PRO loads any file present in its directory with an ".inc" extension as a source file. You can use then an .inc file to store your variables and then include this file manually in the crontab, so that these variables will be available to both the crontab and the XSIBACKUP-PRO executable.

Provided that your XSIBACKUP-PRO installation directory is the default /vmfs/volumes/datastore1/xsi-dir/, and that the file containing your variables is called, your xsibackup-cron file would look like the above.

The cronfile will load the vars by means of the line

source /vmfs/volumes/datastore1/xsi-dir/

So, they will be available to the xsibackup-cron file, and on the other side XSIBACKUP-PRO will load any ".inc" file present at its installations dir, including "", so those variables will also be available to XSIBACKUP-PRO.

Be careful not to use any reserved system keyword or any variable name that XSIBackup uses as part of its functioning.

Website Map
IT Manager
In Site
Resources & help
Index of Docs
33HOPS Forum

Fill in to download
The download link will be sent to your e-mail.

            Read our Privacy Policy