#1 2018-03-01 10:41:01

dsteuer
Member
Registered: 2018-03-01
Posts: 3

Problem restoring VM from one ESXi to another (*solved*)

Hi @all.

Maybe im doing something wrong.
I tried as in the manpage described - but i done goofed.
So im happy for any help.

Also: Is this backup/restore technique recommended or would i be better off otherwise?


I have the 2 ESXi Server both 6.0.0 U1
For testing i set up a VM "backuptest"

I backed up on ESXi02 (100.2) to ESXi01 (100.4) with:

./xsibackup --mail-to=my@mail.de --smtp-srv=192.168.100.222 --smtp-port=25 --mail-from=esx@domain.de --smtp-auth=none --smtp-usr=none --smtp-pwd=123 --backup-point="192.168.100.4:22:/vmfs/volumes/datastore1/backup" --backup-type=custom  --backup-vms="backuptest" --backup-prog=rsync

wich worked and resulted on ESXi01 in:

[root@esxi-01:/vmfs/volumes/5a8c2b2f-f17d687a-edbe-d89d6718da5c/backup] find
./backuptest
./backuptest/backuptest_1.vmx
./backuptest/backuptest_1.vmsd
./backuptest/backuptest_1.nvram
./backuptest/backuptest-1.vmdk
./backuptest/backuptest-1-flat.vmdk
./backuptest/backuptest_1-Snapshot4.vmsn
./backuptest/backuptest_1-Snapshot5.vmsn
./esxi2.domain.de-192.168.100.2-config.tgz

I deleted my test VM on ESXi2 and tried to restore it
(A former test with local backup and restore worked)

At ESXi02:
[root@esxi2:/vmfs/volumes/56d94b94-f0074f12-e837-f0795936b658/xsi-dir]
./xsibackup --restore-vms=192.168.100.4:22:/vmfs/volumes/5a8c2b2f-f17d687a-edbe-d89d6718da5c/backup/backuptest/

and i get:

RESTORE VIRTUAL MACHINES:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Detected OpenSSH server at 192.168.100.4:22 and folder at "/vmfs/volumes/5a8c2b2f-f17d687a-edbe-d89d6718da5c/backup/backuptest/"
Checking the type of backup...
ls: /vmfs/volumes/5a8c2b2f-f17d687a-edbe-d89d6718da5c/backup/backuptest//config: No such file or directory
The remote folder "/vmfs/volumes/5a8c2b2f-f17d687a-edbe-d89d6718da5c/backup/backuptest/" at 192.168.100.4:22 seems to contain a VM
Where do you want that backup to be restored to?: /vmfs/volumes/datastore1/
Source: "/vmfs/volumes/5a8c2b2f-f17d687a-edbe-d89d6718da5c/backup/backuptest/"
Target: "/vmfs/volumes/datastore1"
sh: /vmfs/volumes/5a8c2b2f-f17d687a-edbe-d89d6718da5c/backup/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


My xsi-dir on ESXi01
[root@esxi-01:/vmfs/volumes/5a8c2b2f-f17d687a-edbe-d89d6718da5c/xsi-dir] find
.
./bin
./bin/dd
./bin/pv
./bin/xsibackup-rsync
./bin/xsidiff
./bin/xsidiff___hash
./bin/xsibackup-rsync___hash
./bin/pv___hash
./conf
./conf/smtpsrvs
./conf/xsiopts
./conf/smtpsrvs___hash
./conf/xsiopts___hash
./src
./src/borg
./src/certify
./src/esxbackup
./src/events
./src/functions
./src/instcron
./src/mapblocks
./src/onediff
./src/pro
./src/pro/vmsregexp
./src/pro/vmsregexp___hash
./src/restore
./src/sendmail
./src/smartinfo
./src/xsitools
./src/functions___hash
./src/mapblocks___hash
./src/borg___hash
./src/esxbackup___hash
./src/events___hash
./src/onediff___hash
./src/restore___hash
./src/sendmail___hash
./src/smartinfo___hash
./src/xsitools___hash
./EULA
./README.txt
./xsibackup
./license.key
./xsibackup_id_rsa.pub
./request.key
./xsibackup-cron-192.168.100.2.log
./xsibackup_id_rsa
./.ERR-061c58b3668b2f526a40d76d185078c2bb28f070
./xsibackup___hash
./EULA___hash



My xsi-dir on ESXi02
[root@esxi2:/vmfs/volumes/56d94b94-f0074f12-e837-f0795936b658/xsi-dir] find
.
./bin
./bin/dd
./bin/pv
./bin/xsibackup-rsync
./bin/xsidiff
./bin/xsibackup-rsync___hash
./bin/xsidiff___hash
./conf
./conf/smtpsrvs
./conf/xsiopts
./src
./src/borg
./src/certify
./src/esxbackup
./src/events
./src/functions
./src/instcron
./src/mapblocks
./src/onediff
./src/pro
./src/pro/vmsregexp
./src/restore
./src/sendmail
./src/smartinfo
./src/xsitools
./EULA
./README.txt
./xsibackup
./xsibackup-cron.001
./license.key
./request.key
./xsibackup_id_rsa.pub
./xsibackup-cron.log
./xsibackup-cron
./xsibackup_id_rsa
./.ERR-5a51b769b42a22c64335e2f2fde362af35831470

Last edited by dsteuer (2018-03-01 11:47:48)

Offline

#2 2018-03-01 11:47:18

dsteuer
Member
Registered: 2018-03-01
Posts: 3

Re: Problem restoring VM from one ESXi to another (*solved*)

Hi again,
it seems I can answer my onw question:

1. Double check you have the licence info rigth.
I would suggest you do this to make sure everything is in place:

run "esxcfg-nics -l" to see the mac address of your 1st network card.
Transfer the licence file with said mac address to your server and into the xsi-dir
copy the file to license.key
Now you have the file twice but you can check easily if the right file was copied.
If in doubt you can also "md5sum" both files - and if the hash is equal you are set.
Maybe you have to reboot the ESXi but i am not sure of that.

2. dont use rsync as backup method, use --backup-prog=OneDiff
This mirrors my VM to another ESXi - exactly what i wanted.

Maybe it helps someone smile

Offline

#3 2018-11-27 14:28:14

glenndm
Member
Registered: 2018-11-27
Posts: 3

Re: Problem restoring VM from one ESXi to another (*solved*)

Hello,

I'm attempting the same thing.
I have two esxi hosts, the first one will be replaced with the target one in the near future

Server 1: ip 192.168.54.245     origin      "old"   esxi 6.5   xsibackup pro v11.0
Server 2: ip 192.168.54.254     target     new   esxi 6.7

ssh clients are allowed on the firewall and private key based logins are working

However the backup command keeps asking a password.  (see below)

"/vmfs/volumes/SSDmini/xsi-dir/xsibackup" --backup-point="192.168.54.254:22:/vmfs/volumes/datastore1" --backup-type=custom --backup-vms="w10_sql" --backup-prog=OneDiff

I do not know which password is required here. Entering the root password or anything else here, has no visible effect.

any suggestions?
----------------
###############################################################################
#
#  (c) XSIBACKUP-PRO 11.0.0 | Backup for (c) VMWARE ESXi Hypervisor by 33hops.com
#
###################################################################################

NOTICE: (c) XSIBackup kills any user launched jobs, make sure you don't overlap manual jobs
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NOTICE: (c) XSIBackup-Pro 11.1.6 is available to download
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
XSIBackup PID:         30426608                                                       esxi.home
Tue, 27 Nov 2018 14:32:44 +0000                              IPv4: 192.168.54.245/255.255.255.0
VMware ESXi 6.5.0 build-5969303                              (c) Rsync 3.1.0 as opt. dependency
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Backup Id:              unknown                       Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Crontab isi not installed for user root
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Backup user is: root
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Backup program is: onediff
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Service OpenSSH ready at server 192.168.54.254:22
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Info: XSIBACKUP-PRO will now try to determine the remote's XSIBACKUP-PRO installation point...
Tip: should this process take too long, use the --remote-xsipath argument to set it
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Password:
Password:

Offline

#4 2018-11-27 15:09:29

glenndm
Member
Registered: 2018-11-27
Posts: 3

Re: Problem restoring VM from one ESXi to another (*solved*)

it seems I've overlooked some steps.
1)the two servers need to be linked with --link-srv.
2)Furthermore it seems xsibackup has to be installed on the second server as well
looking into that now

Offline

#5 2018-11-29 16:29:28

admin
Administrator
Registered: 2017-04-21
Posts: 563

Re: Problem restoring VM from one ESXi to another (*solved*)

Yes, the two servers need to be linked, otherwise they would not be able to communicate unless you would enter the root password some hundred times. The latter would not even be possible due to how XSIBackup has been programmed.

You do not need to do anything in regards to XSIBackup being present on the other side, just link both servers and XSIBackup will take care of the rest.

Offline

#6 2018-12-07 09:32:27

glenndm
Member
Registered: 2018-11-27
Posts: 3

Re: Problem restoring VM from one ESXi to another (*solved*)

Thank you.
after linking the servers (./xsibackup --link_srv=192.168.54.254) and activating the xsi-diff license, the backup went smoothly.
an 150gb vm took about 30 minutes.

A point of importance: all existing snapshots were deleted during the test backup and replaced with xsidiff snapshot. possibly because of the basic command I used.

Offline

#7 2018-12-07 10:49:13

admin
Administrator
Registered: 2017-04-21
Posts: 563

Re: Problem restoring VM from one ESXi to another (*solved*)

Well, that's 85 mb/s on the whole disk including zeros. If you use thin disks and/or a VMFS volume to store your production VMs and your virtual HD is only partially used, you should get much faster speeds. That depends on the load of the server at the time to perform the backup though.

If you use OneDiff to backup, you will loose any preexisting snapshot, if you use XSITools they will be preserved.

Offline

Board footer