File restore not finding any option
-
Hello.
I have full backups from VMs. I can restore the full VM, with no issues at all:But I want actually, from that VM particularly, a few files only. They are in total a few hundred KB but they are super important. So I wanted to give file restore a try. Now there is no option at all, no option to select any full backup or anything:
So I am wondering - how to achieve that? Do I need to use some special backup option before I am able to do a file-based restore or am I missing something?
-
You can use 7-zip to open it and get only necessary files.
-
File level restore works only in Delta mode.
-
@olivierlambert thx for that, i will. setup new backups accordingly.
But the existing backup, that I have done, a full backup, is completely failing to restore. If I try regular restore (destination is different host as the previous failed), all I get is this:
whereas:
so hosts SR definitely can host 30GB disk... but if I look into the log section in config:
So what now - I lost the backup forever, and I should just forget about the files? I tried to open the backup file, as suggested with 7zip, and all I get is the list of many thousands of files inside the XVA...
Any pointers would be greatly appreciated.
rgD
-
This message only means you don't have enough space to restore your backup on the target storage repository. Please select a SR with more free space.
-
@olivierlambert but as you can see, target SR has several hundred GB free, I also tried to restore on completely different host that has several terabytes free and I get same response..
-
What's the size of the virtual disk for this VM?
-
@olivierlambert 30GB
-
Are you sure it's the disk size and not the space used in the VM? That's very different in thick SR.
For the first screenshot, it's pretty clear that's the issue. For the second one, it's a different problem. Are you using XO from the sources or XOA?
-
@olivierlambert all my VMs have same disk size, inside VM I attach iSCSI drive - that drive is big but it is not part of the backup.
I use XO from sources. Both screenshots are from same backup job, just different sections - one from tick on the fail icon inside backup page and second is inside settings -> logs -
On which commit are you?
-
-
Please first get on latest commit and rebuild That's the first step before reporting a problem, as explained in our official doc
-
@olivierlambert roger! I am upgrading now an testing
-
@damjank said in File restore not finding any option:
@olivierlambert roger! I am upgrading now an testing
SO I have upgraded to latest version of open source version of XO. I am currently at:
-
xo-server 5.111.1
-
xo-web 5.114.0
-
build afadc - https://github.com/vatesfr/xen-orchestra/commit/afadc8f95adf741611d1f298dfe77cbf1f895231
-
also latest version of backup proxy
I try the restore, same result, here is the complete log (from settings -> logs):
backupNg.importVmBackup { "id": "70cc277b-7a40-4be1-b3bb-af6694d7fd77//xo-vm-backups/b7f3f3b4-bbd6-c2eb-06f2-31917ac7a1a0/20230129T030711Z.json", "settings": { "mapVdisSrs": {}, "newMacAddresses": false }, "sr": "11e5da06-7f76-2a74-3040-e66887d22844" } { "message": "Cannot read properties of undefined (reading 'id')", "name": "TypeError", "stack": "TypeError: Cannot read properties of undefined (reading 'id') at BackupNg.importVmBackupNg (file:///opt/xo/xo-builds/xen-orchestra-202304111128/packages/xo-server/src/xo-mixins/backups-ng/index.mjs:531:21) at Api.#callApiMethod (file:///opt/xo/xo-builds/xen-orchestra-202304111128/packages/xo-server/src/xo-mixins/api.mjs:401:20)" }
-
-
Fist : to help you get your file as fast as possible:
since ths is a full vm backup, tha data are stored in a .xva file in<your remote>/xo-vm-backups/<uuid of the vm>/<date of the backup>.xva
datetime of the backup can be a little different, depending on your timezonethis file should be importable through the
import VM
feature of XOthen , to understand the root cause: are you restoring through the proxy ?
Is there anything related in the xo logs ? -
If nothing will help and you can't import xva with
import VM
, I have solution.- Deploy new VM with disk x4 times greater than backup file. OS Ubuntu 16.04 or later.
- Copy backup. Take attention. You need always copy backup. Do not move it.
- Install xva-img https://github.com/eriklax/xva-img
add-apt-repository ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y gcc-7 cd to xva-img dir and run next command cmake ./ make install
- Extract
xva
file
tar -xf my-virtual-machine.xva -C my-virtual-machine chmod -R 755 my-virtual-machine
- In folder
my-virtual-machine
you will find some directory likeRef :1
, but maybe with another number. Remember this number. - Create
raw
disk from extracted. Replace 1 with number from previous step.
xva-img -p disk-export my-virtual-machine/Ref\:1/ disk.raw
- Install
qemu-utils
apt install qemu-utils
- Convert
raw
tovhd
qemu-img convert -f raw -O vpc disk.raw [vhd-name-you-like].vhd
- Copy
vhd
to some SR. I'm using local SRs, so in my case path is/var/run/sr-mount/[sr-uuid]
- Go to the host,
cd
to SR folder, get VHD uuid, rename VHD
cd /var/run/sr-mount/[sr-uuid] vhd-util read -p -n [vhd-name-you-like_from-step-8].vhd mv [vhd-name-you-like_from-step-8].vhd [uuid].vhd
- Rescan SR
- Attach VHD to existing VM or deploy new one
- Get you files
-
@splastunov said in File restore not finding any option:
If nothing will help and you can't import xva with
import VM
, I have solution.- Deploy new VM with disk x4 times greater than backup file. OS Ubuntu 16.04 or later.
- Copy backup. Take attention. You need always copy backup. Do not move it.
- Install xva-img https://github.com/eriklax/xva-img
add-apt-repository ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y gcc-7 cd to xva-img dir and run next command cmake ./ make install
- Extract
xva
file
tar -xf my-virtual-machine.xva -C my-virtual-machine chmod -R 755 my-virtual-machine
- In folder
my-virtual-machine
you will find some directory likeRef :1
, but maybe with another number. Remember this number. - Create
raw
disk from extracted. Replace 1 with number from previous step.
xva-img -p disk-export my-virtual-machine/Ref\:1/ disk.raw
- Install
qemu-utils
apt install qemu-utils
- Convert
raw
tovhd
qemu-img convert -f raw -O vpc disk.raw [vhd-name-you-like].vhd
- Copy
vhd
to some SR. I'm using local SRs, so in my case path is/var/run/sr-mount/[sr-uuid]
- Go to the host,
cd
to SR folder, get VHD uuid, rename VHD
cd /var/run/sr-mount/[sr-uuid] vhd-util read -p -n [vhd-name-you-like_from-step-8].vhd mv [vhd-name-you-like_from-step-8].vhd [uuid].vhd
- Rescan SR
- Attach VHD to existing VM or deploy new one
- Get you files
wow. I am getting on with this in parallel. Thank you again! Results for both suggestions and requests are coming!