Last updated on Monday 28th of February 2022 08:52:48 PM

©XSIBackup-Pro, Restore module

 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.

©XSIBackup-Pro offers a restore module as part of the Pro version. It allows to easily browse stored backups choose one of them and restore it to the desired local path. The restore module can restore any of the backup types performed with ©XSIBackup-Pro: local (vmkfstools), Rsync & Borg.

You can browse stored backups in case of local or Borg backups, filter the results and choose from a list. In case of remote backups, you must provide the full path to the VM on the remote server:

Example1 (restore remote backup stored in an Rsync server):

# ./xsibackup --restore-vms=10.0.0.10:22:/backup/my-vm-backups/20180500000000/MyVM1


(*) In case you use paths with interstitial spaces, please, don't forget to quote them appropiately.

Restoring a local backup is very easy by using the built in functions to list and filter results. You just have to tell the restore module which folder your backups are stored in. The browser will detect two levels underneath the proposed path. This is not arbitrary, as ©XSIBackup allows to create timestamped subfolders. You can then filter by VM name, date strings (by using the same format), or by any part of the full path. Filtering matching is performed partial, thus, any piece of information that matches the VM name or timestamped subfolder will do the trick.

To restore a remote (over IP) backup, you must parse --restore-vms=IP:port:/path/to/vmx/file/yourvm/

The following example demonstrates how to browse and restore a backup from a local repository.

Example2:

Here we firstly obtain a list of all backups present at the /vmfs/volumes/backup storage point by running the command:

./xsibackup --restore-vms=/vmfs/volumes/backup


---------------------------------------------------------------------------------------------------------------------------------------
RESTORE VIRTUAL MACHINES:
---------------------------------------------------------------------------------------------------------------------------------------
©XSIBackup-Pro is able to detect VMs up to two levels below the provided path
This way it can detect VMs stored to the root of it or in timestamped subfolders
Select one of the folders at /vmfs/volumes/backup, or filter the results:
---------------------------------------------------------------------------------------------------------------------------------------
Found 36 Virtual Machines:
1| /vmfs/volumes/435cccfb-0e7108b6/WDES01/WDES1.vmx (WDES1.vmx)
2| /vmfs/volumes/435cccfb-0e7108b6/LCENT53/LCENT53.vmx (LCENT53.vmx)
3| /vmfs/volumes/435cccfb-0e7108b6/LCENT64/LCENT64.vmx (LCENT64.vmx)
4| /vmfs/volumes/435cccfb-0e7108b6/WXP01/WXP1.vmx (WXP1.vmx)
5| /vmfs/volumes/435cccfb-0e7108b6/WPRO01/WPRO01.vmx (WPRO01.vmx)
6| /vmfs/volumes/435cccfb-0e7108b6/New Virtual Machine 2/New Virtual Machine 2.vmx (New Virtual Machine 2.vmx)
7| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/WDES01/WDES1.vmx (WDES1.vmx)
8| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/LCENT53/LCENT53.vmx (LCENT53.vmx)
9| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/XSINAS/XSINAS_1.vmx (XSINAS_1.vmx)
10| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/LCENT64/LCENT64.vmx (LCENT64.vmx)
11| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/WXP01/WXP1.vmx (WXP1.vmx)
12| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/W701/W701.vmx (W701.vmx)
13| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/New Virtual Machine 2/New Virtual Machine 2.vmx (New Virtual Machine 2.vmx)
14| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/WPRO01/WPRO01.vmx (WPRO01.vmx)
15| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/WS2012/WS2012.vmx (WS2012.vmx)
16| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/CRM/CRM.vmx (CRM.vmx)
17| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/WDES01/WDES1.vmx (WDES1.vmx)
18| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/LCENT53/LCENT53.vmx (LCENT53.vmx)
19| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/XSINAS/XSINAS_1.vmx (XSINAS_1.vmx)
20| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/LCENT64/LCENT64.vmx (LCENT64.vmx)
21| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/WXP01/WXP1.vmx (WXP1.vmx)
22| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/W701/W701.vmx (W701.vmx)
23| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/New Virtual Machine 2/New Virtual Machine 2.vmx (New Virtual Machine 2.vmx)
24| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/WPRO01/WPRO01.vmx (WPRO01.vmx)
25| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/WS2012/WS2012.vmx (WS2012.vmx)
26| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/CRM/CRM.vmx (CRM.vmx)
27| /vmfs/volumes/435cccfb-0e7108b6/CRM/CRM.vmx (CRM.vmx)
28| /vmfs/volumes/435cccfb-0e7108b6/W702/W702.vmx (W702.vmx)
29| /vmfs/volumes/435cccfb-0e7108b6/20160907195902/W702/W702.vmx (W702.vmx)
30| /vmfs/volumes/435cccfb-0e7108b6/WXPMK/WXPMK.vmx (WXPMK.vmx)
31| /vmfs/volumes/435cccfb-0e7108b6/20161006170047/WDES01/WDES1.vmx (WDES1.vmx)
32| /vmfs/volumes/435cccfb-0e7108b6/20161006170047/W702/W702.vmx (W702.vmx)
33| /vmfs/volumes/435cccfb-0e7108b6/20161006170047/LCENT64/LCENT64.vmx (LCENT64.vmx)
34| /vmfs/volumes/435cccfb-0e7108b6/WXPMKT/WXPMK.vmx (WXPMK.vmx)
35| /vmfs/volumes/435cccfb-0e7108b6/New Virtual Machine 3/New Virtual Machine 3.vmx (New Virtual Machine 3.vmx)
36| /vmfs/volumes/435cccfb-0e7108b6/vms/New Virtual Machine 3/New Virtual Machine 3.vmx (New Virtual Machine 3.vmx)
37| /vmfs/volumes/435cccfb-0e7108b6/LCTEST1/LCTEST1.vmx (LCTEST1.vmx)
---------------------------------------------------------------------------------------------------------------------------------------
Enter the selected VM (n) or a search filter:
---------------------------------------------------------------------------------------------------------------------------------------


At this point you may decide to restore one of the VMs, let's say number 18, but you may want to filter the results (which could be much longer) to get to the list of VMs you stored on a given date, per instance on agoust the 18th 2016, thus you would enter 20160818 into the filter prompt and get:

---------------------------------------------------------------------------------------------------------------------------------------
RESTORE VIRTUAL MACHINES:
---------------------------------------------------------------------------------------------------------------------------------------
XSIBackup-Pro is able to detect VMs up to two levels below the provided path
This way it can detect VMs stored to the root of it or in timestamped subfolders
Select one of the folders at /vmfs/volumes/backup, or filter the results:
---------------------------------------------------------------------------------------------------------------------------------------
Filtered by: 20160818
Found 19 Virtual Machines:
1| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/WDES01/WDES1.vmx (WDES1.vmx)
2| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/LCENT53/LCENT53.vmx (LCENT53.vmx)
3| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/XSINAS/XSINAS_1.vmx (XSINAS_1.vmx)
4| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/LCENT64/LCENT64.vmx (LCENT64.vmx)
5| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/WXP01/WXP1.vmx (WXP1.vmx)
6| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/W701/W701.vmx (W701.vmx)
7| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/New Virtual Machine 2/New Virtual Machine 2.vmx (New Virtual Machine 2.vmx)
8| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/WPRO01/WPRO01.vmx (WPRO01.vmx)
9| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/WS2012/WS2012.vmx (WS2012.vmx)
10| /vmfs/volumes/435cccfb-0e7108b6/20160818132550/CRM/CRM.vmx (CRM.vmx)
11| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/WDES01/WDES1.vmx (WDES1.vmx)
12| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/LCENT53/LCENT53.vmx (LCENT53.vmx)
13| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/XSINAS/XSINAS_1.vmx (XSINAS_1.vmx)
14| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/LCENT64/LCENT64.vmx (LCENT64.vmx)
15| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/WXP01/WXP1.vmx (WXP1.vmx)
16| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/W701/W701.vmx (W701.vmx)
17| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/New Virtual Machine 2/New Virtual Machine 2.vmx (New Virtual Machine 2.vmx)
18| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/WPRO01/WPRO01.vmx (WPRO01.vmx)
19| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/WS2012/WS2012.vmx (WS2012.vmx)
20| /vmfs/volumes/435cccfb-0e7108b6/20160818180214/CRM/CRM.vmx (CRM.vmx)
---------------------------------------------------------------------------------------------------------------------------------------
Enter the selected VM (n) or a search filter:
---------------------------------------------------------------------------------------------------------------------------------------


After you have filtered the results, you can just input the corresponding VM number in the listing and you will get:

Enter the selected VM (n) or a search filter: 7
-------------------------------------------------------------------------------
You chose to restore the VM [New Virtual Machine 2]
-------------------------------------------------------------------------------
Where do you want to restore the selected VM?: /vmfs/volumes/backup_usb


In this example we have decided to restore the VM [New Virtual Machine 2] to the folder /vmfs/volumes/backup_usb. At this point you will be prompted to chose the restore method: vmkfstools or Rsync. Vmkfstools is much faster, but it will detect any present snapshots and restore the VM fully from the topmost snapshot in the chain, thus the resulting VM will be a consolidated guest including all data in all snapshots. The resulting VM will be the equivalent to delete all snapshots in a live VM.

If on the contrary you decide to keep all existing snapshots, you must choose Rsync as the backup mean. Do not worry if you commit a mistake, the backed up VM will remain untouched, so you can repeat the process as many times as you want to.

Enter the selected VM (n) or a search filter: 7
---------------------------------------------------------------------------------------------
You chose to restore the VM [New Virtual Machine 2]
---------------------------------------------------------------------------------------------
Where do you want to restore the selected VM?: /vmfs/volumes/backup_usb
---------------------------------------------------------------------------------------------
You can use vmkfstools or rsync to restore the VM
rsync allows to preserve snapshots if present
I will use rsync | vmkfstools (default):


Confirm that you want to overwrite data and that's it.

You can use vmkfstools or rsync to restore the VM
rsync allows to preserve snapshots if present
I will use rsync | vmkfstools (default):
You have selected to restore the VM [New Virtual Machine 2.vmx] via vmkfstools to "/vmfs/volumes/backup_usb/New Virtual Machine 2", proceed & overwrite dir? (y/n): y
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Source: /vmfs/volumes/435cccfb-0e7108b6/20160818132550/New Virtual Machine 2/New Virtual Machine 2.vmdk
Target: /vmfs/volumes/backup_usb/New Virtual Machine 2/New Virtual Machine 2.vmdk
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Destination disk format: VMFS thin-provisioned
Cloning disk '/vmfs/volumes/435cccfb-0e7108b6/20160818132550/New Virtual Machine 2/New Virtual Machine 2.vmdk'...
Clone: 9% done.


Restoring XSITools backups

Restoring XSITools backups is much the same as restoring any other type of backup. The restore module will detect the type of backup it is and will just ask you where you want to place the restored VM. Since version 11.1.7 restoring virtual machines previously backed up with XSITools can be resumed, should something go wrong in the restore process, such as a broken TCP pipe.

The restore module keeps track of restored chunks in a file named after the disk with a .partial appendix. If the restore process gets interrupted the XSITools restore module reads this file and allows you to resume the latest restore operation at the point where it stopped in the previous restore attempt or to start from the beginning. If the previous restore operation was interrupted before getting to the fifth block in the file, the process is commenced from the start. Once the restore process completes, the eventual .partial files are removed.

Restoring a Borg Backed up VM

It is pretty much the same, but you will parse a path in a server and not just a local path.

-------------------------------------------------------------------------------------------------------------------
RESTORE VIRTUAL MACHINES:
-------------------------------------------------------------------------------------------------------------------
Detected OpenSSH server at 192.168.3.233:22 and folder at "/xsinasbak/backvmsup"
Checking the type of backup...
That looks like a Borg repository
Borg 1.0.8 detected in remote server's path
Getting list of backups from Borg repository...
--------------------------------------------------------------------------------
1| 1482133589 - esxi2.clm95.33hops.com - WDES01 Mon, 2016-12-19 07:44:38
2| 1482136568 - esxi2.clm95.33hops.com - LCENT53 Mon, 2016-12-19 08:34:06
3| 1482137692 - esxi2.clm95.33hops.com - LCENT64 Mon, 2016-12-19 08:52:51
4| 1482140843 - esxi2.clm95.33hops.com - CRM Mon, 2016-12-19 09:45:22
5| 1482302269 - esxi2.clm95.33hops.com - WDES01 Wed, 2016-12-21 06:35:49
6| 1482304965 - esxi2.clm95.33hops.com - LCENT53 Wed, 2016-12-21 07:20:44
7| 1482306150 - esxi2.clm95.33hops.com - LCENT64 Wed, 2016-12-21 07:40:29
8| 1482309333 - esxi2.clm95.33hops.com - CRM Wed, 2016-12-21 08:33:33
9| 1482392622 - esxi2.clm95.33hops.com - WDES01 Thu, 2016-12-22 07:41:44
10| 1482395415 - esxi2.clm95.33hops.com - LCENT53 Thu, 2016-12-22 08:28:16
11| 1482396637 - esxi2.clm95.33hops.com - LCENT64 Thu, 2016-12-22 08:48:38
12| 1482399788 - esxi2.clm95.33hops.com - CRM Thu, 2016-12-22 09:41:09
13| 1482478962 - esxi2.clm95.33hops.com - WDES01 Fri, 2016-12-23 07:40:45
14| 1482481743 - esxi2.clm95.33hops.com - LCENT53 Fri, 2016-12-23 08:27:06
15| 1482483019 - esxi2.clm95.33hops.com - LCENT64 Fri, 2016-12-23 08:48:22
16| 1482486202 - esxi2.clm95.33hops.com - CRM Fri, 2016-12-23 09:41:25
17| 1482553869 - esxi2.clm95.33hops.com - WDES01 ::: Sat, 2016-12-24 04:29:14
18| 1482556694 - esxi2.clm95.33hops.com - LCENT53 ::: Sat, 2016-12-24 05:16:18
19| 1482558005 - esxi2.clm95.33hops.com - LCENT64 ::: Sat, 2016-12-24 05:38:10
20| 1482561228 - esxi2.clm95.33hops.com - CRM ::: Sat, 2016-12-24 06:31:53
21| 1482770833 - esxi1.clm95.33hops.com - LCTEST1 ::: Mon, 2016-12-26 17:47:35
22| 1482777031 - esxi1.clm95.33hops.com - LCTEST1 ::: Mon, 2016-12-26 19:30:53
--------------------------------------------------------------------------------
Choose the backup number you wish to restore or enter a search filter:
--------------------------------------------------------------------------------