©XSIBackup-Free: Free Backup Software for ©VMWare ©ESXi

Forum ©XSIBackup: ©VMWare ©ESXi Backup Software


You are not logged in.

#1 2018-05-18 17:42:42

jaycox
Member
Registered: 2018-05-18
Posts: 7

Remote restore question

Hello,
I am attempting a restore from one esxi to another.

When I enter the following backup command on the esxi I want to restore to,  I get an error in the output about not being a local folder, but it is?


hk-esxi-01:# /vmfs/volumes/datastore1/xsi-dir/xsibackup --restore-vms=216.111.92.68:22:/vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7



###############################################################################
#
#  (c) XSIBACKUP-PRO 10.2.7 | Backup for (c) VMWARE ESXi Hypervisor by 33hops.com
#
###################################################################################

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
RESTORE VIRTUAL MACHINES:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Detected OpenSSH server at 216.111.92.68:22 and folder at "/vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7"
Checking the type of backup...
ls: /vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7/config: No such file or directory
The remote folder "/vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7" at 216.111.92.68:22 seems to contain a VM
Where do you want that backup to be restored to?: /vmfs/volumes/datastore1/
That is not a local folder
Exiting...
Killed

Thank You.

jaycox

Offline

#2 2018-05-20 17:29:17

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Remote restore question

We checked the code and there isn't any bug, we actually remove the last forwardslash in case you add it.
The check that your path is not passing is this:

if [ ! -d /vmfs/volumes/datastore1 ];then echo "Not a directory";else echo "Path is a directory";fi

Execute the above piece of code to see what's going on.
There is a remote possibility that the shell expansion is not removing the last forward slash, so remove it first, just in case.

Offline

#3 2018-05-24 13:30:23

jaycox
Member
Registered: 2018-05-18
Posts: 7

Re: Remote restore question

Thank You . I executed the code. Here is the output.

[root@hk-esxi-01:~] if [ ! -d /vmfs/volumes/datastore1 ];then echo "Not a direct
ory";else echo "Path is a directory";fi
Path is a directory

I'm not sure where, why or how the remote path is appended with /config in the line

'ls: /vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7/config: No such file or directory'

I'm not sure what I'm doing wrong.

Thanks again for your help.

Jay

Offline

#4 2018-05-24 14:41:03

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Remote restore question

Our excuses Jay, you should replace the path "/vmfs/volumes/datastore1", which is just an example, with yours.
I see the problem is you are getting the string config appended to your path.

In the end this is most probably a bug.
Locate this string at aproximately line 253 in the src/pro/restore module (first occurrence of the BTYPE keyword)

BTYPE=$(eval ssh "$SSHOPTS" -p "$srv2" ${defremusr}@"$srv1" "ls \"${srv3// /\ }\"/config 2>/dev/null \&\& cat ${srv3// /\ }/config 2>/dev/null | grep segments_per_dir | wc -l")

Do make sure that you have the string 2>/dev/null right behind

/config

, if not add it.
Please note there are two occurences for that /config string, so make sure the 2>/dev/null code is in each one of those two places.

We fixed this bug some time ago, but you might have an old file.

Offline

#5 2018-05-24 14:53:19

jaycox
Member
Registered: 2018-05-18
Posts: 7

Re: Remote restore question

Your comment about slashes prompted me to test the command adding a / at the end.
Now I don't receive the bad path message, but it's KILLED after rsync error.
Here is the output:

root@hk-esxi-01:~]  /vmfs/volumes/datastore1/xsi-dir/xsibackup --restore-vms=21
6.111.92.68:22:/vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7/

###############################################################################
#                                                                               
#  (c) XSIBACKUP-PRO 10.2.7 | Backup for (c) VMWARE ESXi Hypervisor by 33hops.com
#                                                                               
###################################################################################

-------------------------------------------------------------------------------
RESTORE VIRTUAL MACHINES:
-------------------------------------------------------------------------------
Detected OpenSSH server at 216.111.92.68:22 and folder at "/vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7/"
Checking the type of backup...
ls: /vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7//config: No such file or directory
The remote folder "/vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7/" at 216.111.92.68:22 seems to contain a VM
Where do you want that backup to be restored to?: /vmfs/volumes/datastore1/
Source: "/vmfs/volumes/Edial_2/backup_il-esxi-01/il-build7/"
Target: "/vmfs/volumes/datastore1"
sh: /vmfs/volumes/Edial_2/backup_il-esxi-01/bin/xsibackup-rsync: not found
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.0]
Killed

Offline

#6 2018-05-24 14:56:58

admin
Administrator
Registered: 2017-04-21
Posts: 2,055

Re: Remote restore question

Read the answer above, we updated information while you were answering.
If the problem persists, just contact support and we'll delve into the problem.
It's nevertheless something about that bug above.

Offline

#7 2018-05-24 15:05:11

jaycox
Member
Registered: 2018-05-18
Posts: 7

Re: Remote restore question

The restore path /vmfs/volumes/datastore1, does exist on my esxi box where I am launching the command.
It contains 2 other VMs, and I am trying to get the remote backup VM il-build7 restored to that path.

[root@hk-esxi-01:~] cd /vmfs/volumes/datastore1
[root@hk-esxi-01:/vmfs/volumes/5890ad3b-b6b9fa80-a225-941882798de8] ls -lrt
total 40
drwxr-xr-x    1 root     root          1400 Feb  1 22:50 backups_ilesxi01
drwxr-xr-x    1 root     root           700 Feb  2 14:49 ISOs
drwxr-xr-x    1 root     root          2940 Feb 22 19:23 Yellow-01
drwxr-xr-x    1 root     root          2940 Feb 22 19:24 Yellow-03
drwxr-xr-x    1 root     root          1960 May 24 14:47 xsi-dir
[root@hk-esxi-01:/vmfs/volumes/5890ad3b-b6b9fa80-a225-941882798de8] pwd
/vmfs/volumes/datastore1

Offline

Board footer