XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    File restore not finding any option

    Scheduled Pinned Locked Moved Xen Orchestra
    backupfile levelrestore
    18 Posts 4 Posters 1.6k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      damjank @olivierlambert
      last edited by

      @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:

      2023-04-11_11-11.png

      whereas:
      2023-04-11_11-11_1.png

      so hosts SR definitely can host 30GB disk... but if I look into the log section in config:
      2023-04-11_11-12.png

      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

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        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.

        D 1 Reply Last reply Reply Quote 0
        • D Offline
          damjank @olivierlambert
          last edited by

          @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..

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            What's the size of the virtual disk for this VM?

            D 1 Reply Last reply Reply Quote 0
            • D Offline
              damjank @olivierlambert
              last edited by

              @olivierlambert 30GB

              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                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?

                D 1 Reply Last reply Reply Quote 0
                • D Offline
                  damjank @olivierlambert
                  last edited by

                  @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

                  1 Reply Last reply Reply Quote 0
                  • olivierlambertO Offline
                    olivierlambert Vates 🪐 Co-Founder CEO
                    last edited by

                    On which commit are you?

                    D 1 Reply Last reply Reply Quote 0
                    • D Offline
                      damjank @olivierlambert
                      last edited by

                      @olivierlambert I am on 53e0f (https://github.com/vatesfr/xen-orchestra/commit/53e0f17c55c2f023d1f852411ecaa703ba9a3927)

                      0 fbeauchamp committed to vatesfr/xen-orchestra
                      feat(xo-server): import multiple from ESXi (#6708)
                      1 Reply Last reply Reply Quote 0
                      • olivierlambertO Offline
                        olivierlambert Vates 🪐 Co-Founder CEO
                        last edited by

                        Please first get on latest commit and rebuild 🙂 That's the first step before reporting a problem, as explained in our official doc

                        D 1 Reply Last reply Reply Quote 0
                        • D Offline
                          damjank @olivierlambert
                          last edited by

                          @olivierlambert roger! I am upgrading now an testing

                          D 1 Reply Last reply Reply Quote 0
                          • D Offline
                            damjank @damjank
                            last edited by

                            @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)"
                            }
                            
                            0 julien-f committed to vatesfr/xen-orchestra
                            fix(read-chunk): better not enough data error message
                            florentF 1 Reply Last reply Reply Quote 0
                            • florentF Offline
                              florent Vates 🪐 XO Team @damjank
                              last edited by

                              @damjank

                              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 timezone

                              this file should be importable through the import VM feature of XO

                              then , to understand the root cause: are you restoring through the proxy ?
                              Is there anything related in the xo logs ?

                              1 Reply Last reply Reply Quote 0
                              • splastunovS Offline
                                splastunov
                                last edited by

                                If nothing will help and you can't import xva with import VM, I have solution.

                                1. Deploy new VM with disk x4 times greater than backup file. OS Ubuntu 16.04 or later.
                                2. Copy backup. Take attention. You need always copy backup. Do not move it.
                                3. 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
                                
                                1. Extract xva file
                                tar -xf my-virtual-machine.xva -C my-virtual-machine
                                chmod -R 755 my-virtual-machine
                                
                                1. In folder my-virtual-machine you will find some directory like Ref :1, but maybe with another number. Remember this number.
                                2. Create raw disk from extracted. Replace 1 with number from previous step.
                                xva-img -p disk-export my-virtual-machine/Ref\:1/ disk.raw
                                
                                1. Install qemu-utils
                                apt install qemu-utils
                                
                                1. Convert raw to vhd
                                qemu-img convert -f raw -O vpc disk.raw [vhd-name-you-like].vhd
                                
                                1. Copy vhd to some SR. I'm using local SRs, so in my case path is /var/run/sr-mount/[sr-uuid]
                                2. 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
                                
                                1. Rescan SR
                                2. Attach VHD to existing VM or deploy new one
                                3. Get you files
                                D 1 Reply Last reply Reply Quote 0
                                • D Offline
                                  damjank @splastunov
                                  last edited by

                                  @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.

                                  1. Deploy new VM with disk x4 times greater than backup file. OS Ubuntu 16.04 or later.
                                  2. Copy backup. Take attention. You need always copy backup. Do not move it.
                                  3. 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
                                  
                                  1. Extract xva file
                                  tar -xf my-virtual-machine.xva -C my-virtual-machine
                                  chmod -R 755 my-virtual-machine
                                  
                                  1. In folder my-virtual-machine you will find some directory like Ref :1, but maybe with another number. Remember this number.
                                  2. Create raw disk from extracted. Replace 1 with number from previous step.
                                  xva-img -p disk-export my-virtual-machine/Ref\:1/ disk.raw
                                  
                                  1. Install qemu-utils
                                  apt install qemu-utils
                                  
                                  1. Convert raw to vhd
                                  qemu-img convert -f raw -O vpc disk.raw [vhd-name-you-like].vhd
                                  
                                  1. Copy vhd to some SR. I'm using local SRs, so in my case path is /var/run/sr-mount/[sr-uuid]
                                  2. 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
                                  
                                  1. Rescan SR
                                  2. Attach VHD to existing VM or deploy new one
                                  3. Get you files

                                  wow. I am getting on with this in parallel. Thank you again! Results for both suggestions and requests are coming!

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post