#1 2020-01-28 12:26:34

Evgeny
Member
Registered: 2018-08-16
Posts: 12

XSIBackup 11.2.8 - where is jobs directory?

Hello, need your help :-( Already worked long time with XSIBackup free 6.0.11 - it was stable and comfortable. But some days ago I tried to install new version (11.2.8) onto my new host:

cd /tmp && \
esxcli network firewall unload && \
wget http://a.33hops.com/downloads/?key=***************** -O XSIBACKUP-FREE-download.zip && \
unzip XSIBACKUP-FREE-download.zip && chmod 0700 install && ./install || cat xsibackup.zip && echo "" && \
rm -rf XSIBACKUP-FREE-download.zip && \
esxcli network firewall load

But all has been changed, reading the manual:

"- Backup jobs are no longer stored into the xsibackup-cron file, as it does not exist any more. They are now placed in the xsi-dir/jobs directory. You must assign these jobs an Id consisting in up to 3 numbers"

Strange, but I didn't find such directory (jobs). So I tried to run command:

/vmfs/volumes/datastore1/xsi-dir # ./xsibackup --cron-install

XSIBackup just tried to backup all my VM's but it didn't find path to backup location:

"Error RBAKSRV1: unable to determine the backup point location"

Anyway, there are still no jobs directory, no example job in this directory - nothing. Why?

Last edited by Evgeny (2020-01-28 12:27:12)

Offline

#2 2020-01-28 19:43:14

admin
Administrator
Registered: 2017-04-21
Posts: 1,302

Re: XSIBackup 11.2.8 - where is jobs directory?

Create the jobs directory in the root folder and place your jobs there 000-999, i.e.:

/scratch/XSI/XSIBackup/jobs/001

If you run a job and it's working as you expect, i.e:

./xsibackup --backup-prog=Vmkfstools --backup-type=custom --backup-vms="VM1, VM2, VM3" --backup-point=/vmfs/volumes/backup1/my-backups

Just add --save-job=NNN to the end of the command and it will be saved to /scratch/XSI/XSIBackup/jobs/, the jobs directory will be created should it not exist.

./xsibackup --backup-prog=Vmkfstools --backup-type=custom --backup-vms="VM1, VM2, VM3" --backup-point=/vmfs/volumes/backup1/my-backups --save-job=001

Then edit the conf/root-crontab file, creating it if it doesn't exist, and place your schedules there, i.e.:

0 2 * * * /scratch/XSI/XSIBackup/jobs/001

The above to run your 001 job everyday at 2:00 in the night, then run

./xsibackup --install-cron

And then

./xsibackup --update-cron

To make your crontab permanent even after a reboot.

Once you have setup your job at /scratch/XSI/XSIBackup/jobs/001, some people add it directly to the /var/spool/cron/crontabs/root file, which is the file holding the root cron schedules. The caveat in doing that is this file is not persistent across reboots, thus next time you reboot your ESXi server, the schedule will be lost and you will have to re-enter it.

Apart from that the /scratch/XSI/XSIBackup/jobs/001 file has 0600 permissions and in some ESXi versions you can't even edit it, so you have to delete it, create it again assign 0700 permissions, edit it and the change permissions back to 0600.

To avoid all that hassle, keep your cron schedules in the conf/root-crontab file and run ./xsibackup --update-cron every time you modify it.

Offline

#3 2020-02-05 12:41:45

Evgeny
Member
Registered: 2018-08-16
Posts: 12

Re: XSIBackup 11.2.8 - where is jobs directory?

Have more questions about your example; you said I should create jobs directory in /scratch/XSI/XSIBackup but I have no such directories:

[root@ESXi6:/vmfs/volumes/59270233-2be3492c-356e-0cc47adb0a68] pwd
/scratch
[root@ESXi6:/vmfs/volumes/59270233-2be3492c-356e-0cc47adb0a68] ls -lh
total 1024
drwxr-xr-x    1 root     root           8 May 25  2017 core
drwxr-xr-x    1 root     root           8 May 25  2017 downloads
drwxr-xr-x    1 root     root           8 Feb  5 10:26 log
drwxr-xr-x    1 root     root           8 May 25  2017 var

So should I create at first XSI directory, then XSIBackup inside and after that - jobs directory?

Last edited by Evgeny (2020-02-05 12:42:44)

Offline

#4 2020-02-05 18:10:26

admin
Administrator
Registered: 2017-04-21
Posts: 1,302

Re: XSIBackup 11.2.8 - where is jobs directory?

You have an install file in the root of the package. Please, read the README.txt file. There you can find the information you need to install:

USING THE INSTALLER

    	Unzip the distribution package in any folder of your ESXi server. You
	can then install the package by using the install script, you just need
	to make it ("install" file) executable and follow the instructions 
	on-screen. You can run the below command from the same folder once 
	you have unpacked the distribution package. If you are reading this,
	you have already done so.

		# chmod 0700 install && ./install
		
	The install script saves the working /conf folder to a temporary dir
	at the /tmp FS and restores it when the install script has finished.
	Should you have some RSA or XSIDiff keys, xsibackup-cron.log files, 
	crontabs, etc... the installation process will respect them.

Offline

#5 2020-02-06 08:23:25

Evgeny
Member
Registered: 2018-08-16
Posts: 12

Re: XSIBackup 11.2.8 - where is jobs directory?

Please look - here is my actions with install:

[root@ESXi6:/tmp] ./install

          ------------------------------
          ->  XSIBackup Installation  <-
          ------------------------------

This will install XSIBackup to the desired directory
It is recommended that you use the root user for the
installation process, to avoid problems derived from
the lack of privileges.

Just provide the base path, the installation process
will create the xsi-dir root folder under it.

Where do you want to install XSIBackup to? (/vmfs/volumes/datastore1):
-----------------------------------------------------
XSIBackup will be installed to the following directory:
-----------------------------------------------------
Install dir: /vmfs/volumes/datastore1/xsi-dir
-----------------------------------------------------
Confirm that you want to install to the directory above (yes/no): yes
-----------------------------------------------------
Backing up configuration files directory...
-----------------------------------------------------
Backing up logs...
-----------------------------------------------------

Archive:  /vmfs/volumes/datastore1/xsi-dir/XSIBACKUP-FREE.zip
   creating: src/
  inflating: src/api
  inflating: src/cron-init
  inflating: src/functions
  inflating: src/instcron
  inflating: src/mapblocks
  inflating: src/onediff
  inflating: src/sendmail
  inflating: src/version
  inflating: src/xsitools
  inflating: EULA
  inflating: xsibackup
   creating: bin/
  inflating: bin/dd
  inflating: bin/pv
  inflating: bin/xsibackup-rsync
  inflating: bin/xsidiff
   creating: conf/
  inflating: conf/dialogrc
  inflating: conf/smtpsrvs
  inflating: conf/xsiopts
-----------------------------------------------------
Applying permissions to files...
-----------------------------------------------------
The software has been installed and permissions were applied
-----------------------------------------------------
Restoring configuration files...
-----------------------------------------------------
Restoring logs...
Do you want to execute (c)XSIBackup now (yes/no): yes
-----------------------------------------------------
--------------------------------------------------------------------------------------------
|                        Rsyslog is not available in XSIBACKUP-FREE                        |
|                          Get XSIBACKUP-PRO at http://33hops.com                          |
--------------------------------------------------------------------------------------------

######################################################
#     XSIBACKUP-FREE: END-USER LICENSE AGREEMENT     #
######################################################

LAST UPDATED: 2018-06-20 (FORMAT YYYY-MM-DD)

COPYRIGHT 2015-2018 | DANIEL JESUS GARCIA FIDALGO
33HOPS, SISTEMAS DE INFORMACION Y REDES, S.L.
ALL RIGHTS RESERVED

YOU ARE ALLOWED TO USE THIS SOFTWARE FOR PERSONAL OR
COMMERCIAL USE. YOU ARE ALLOWED TO REDISTRIBUTE IT
WITHOUT ANY MODIFICATION ON A ONE TO ONE BASE. YOU
CAN MODIFY IT'S SOURCE CODE FREELY JUST AS LONG AS
YOU DO NOT REDISTRIBUTE THE MODIFIED SOURCE CODE IN
ANY WAY.

THIS PROGRAM IS DISTRIBUTED AS IS WITHOUT ANY WARRANTY;
USE AT YOUR OWN RISK.

NOTE: RSYNC IS A DIFFERENT PROGRAM THAN XSIBACKUP RELEASED
UNDER A DIFFERENT LICENSE. XSIBACKUP MAKES USE OF RSYNC
THROUGH ITS COMMAND LINE OPTIONS AND IS USED AS A MERE
DEPENDENCY. XSIBACKUP LICENSE AFFECTS ONLY XSIBACKUP CODE.

YOU CAN DOWNLOAD RSYNC SOURCE CODE AT:
HTTPS://DOWNLOAD.SAMBA.ORG/PUB/RSYNC/

YOU CAN REVIEW RSYNC LICENSE AT:
HTTPS://RSYNC.SAMBA.ORG/GPL.HTML

I ACCEPT THE LICENSE AGREEMENT (yes/no) yes
------------------------------------------------------------------------------------------------------------------------------------------------------------
You can start now using XSIBACKUP-FREE 11.2.8

So I don't see XSI directory inside /scratch - why?

[root@ESXi6:/tmp] cd /scratch/
[root@ESXi6:/vmfs/volumes/59270233-2be3492c-356e-0cc47adb0a68] ls
core       downloads  log        var

Offline

#6 2020-02-06 19:32:21

admin
Administrator
Registered: 2017-04-21
Posts: 1,302

Re: XSIBackup 11.2.8 - where is jobs directory?

Please pay attention to the install log:

-----------------------------------------------------
XSIBackup will be installed to the following directory:
-----------------------------------------------------
Install dir: /vmfs/volumes/datastore1/xsi-dir
-----------------------------------------------------

Offline

#7 2020-02-07 09:57:27

Evgeny
Member
Registered: 2018-08-16
Posts: 12

Re: XSIBackup 11.2.8 - where is jobs directory?

Finally it works!! Thank you for support :-)

Offline

#8 2020-02-17 07:24:08

Evgeny
Member
Registered: 2018-08-16
Posts: 12

Re: XSIBackup 11.2.8 - where is jobs directory?

Excuse me for disturbing but I found some problem; here is part of my /var/spool/cron/crontabs/root:

00 7 * * 7 /vmfs/volumes/datastore1/xsi-dir/jobs/001 # Added by XSIBackup
30 9 * * 7 /vmfs/volumes/datastore1/xsi-dir/jobs/002 # Added by XSIBackup

This should run every Sunday but it runs every day at the same time (7:00 AM and 9:00 AM in my example). Why?

Offline

#9 2020-02-18 10:50:31

admin
Administrator
Registered: 2017-04-21
Posts: 1,302

Re: XSIBackup 11.2.8 - where is jobs directory?

Maybe valid weekdays are 0-6

Offline

#10 2020-02-18 11:56:34

Evgeny
Member
Registered: 2018-08-16
Posts: 12

Re: XSIBackup 11.2.8 - where is jobs directory?

You are right, thanks!!! :-)

Offline

Board footer