Closed PieterWaegeman closed 5 years ago
This is still not fixed with this patch. When I apply the changes I still get the same error.
Thanks, I'll take a look.
Logs now only show this when it occurs:
Command failed: vhdimount /mnt/backupxo-vm-backups/1809d606-be1e-1b9a-fe68-044ac52b8d37/vdis/05baeea1-1151-4f7a-b7a9-bda9caf92303/ab188dce-7813-451f-a714-911427f1f81c/20181203T001338Z.vhd /tmp/tmp-8770ymcrtzcfpyk1 Unable to open source file. libcfile_file_open_with_error_code: no such file: /mnt/backupxo-vm-backups/1809d606-be1e-1b9a-fe68-044ac52b8d37/vdis/05baeea1-1151-4f7a-b7a9-bda9caf92303/ab188dce-7813-451f-a714-911427f1f81c/20181203T001338Z.vhd. libcfile_file_open: unable to open file. libbfio_file_open: unable to open file: /mnt/backupxo-vm-backups/1809d606-be1e-1b9a-fe68-044ac52b8d37/vdis/05baeea1-1151-4f7a-b7a9-bda9caf92303/ab188dce-7813-451f-a714-911427f1f81c/20181203T001338Z.vhd. libcfile_file_get_size: invalid file - missing descriptor. libbfio_file_get_size: unable to retrieve size of file: /mnt/backupxo-vm-backups/1809d606-be1e-1b9a-fe68-044ac52b8d37/vdis/05baeea1-1151-4f7a-b7a9-bda9caf92303/ab188dce-7813-451f-a714-911427f1f81c/20181203T001338Z.vhd. libbfio_handle_get_size: unable to retrieve size. libvhdi_file_open_read: unable to retrieve file size. libvhdi_file_open_file_io_handle: unable to read from file handle. libvhdi_file_open: unable to open file: /mnt/backupxo-vm-backups/1809d606-be1e-1b9a-fe68-044ac52b8d37/vdis/05baeea1-1151-4f7a-b7a9-bda9caf92303/ab188dce-7813-451f-a714-911427f1f81c/20181203T001338Z.vhd. mount_handle_open_input: unable to open input file.
vhdimount 20160424
Experiencing the same behavior after updating to the latest version yesterday.
We are using 7 days delta backups. I can use file restore on delta backups from 3rd December and before, but get same errors on the backups made today at 1am.
Our logs are below.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: Unable to open source file.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: libcfile_file_open_with_error_code: no such file: /xo-vm-backups/a52f0de6-98b9-61b7-c581-9bd48ed859ff/vdis/8aefbee2-3243-46dc-b520-71cd25857a51/e68625d0-0575-491b-9963-db5907eed28d/20181203T000755Z.vhd.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: libcfile_file_open: unable to open file.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: libbfio_file_open: unable to open file: /xo-vm-backups/a52f0de6-98b9-61b7-c581-9bd48ed859ff/vdis/8aefbee2-3243-46dc-b520-71cd25857a51/e68625d0-0575-491b-9963-db5907eed28d/20181203T000755Z.vhd.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: libbfio_handle_open: unable to open handle.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: libvhdi_file_open_file_io_handle: unable to open file IO handle.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: libvhdi_file_open: unable to open file: /run/xo-server/mounts/43815fe3-0741-4f8a-9def-768d6f741eb9/xo-vm-backups/a52f0de6-98b9-61b7-c581-9bd48ed859ff/vdis/8aefbee2-3243-46dc-b520-71cd25857a51/e68625d0-0575-491b-9963-db5907eed28d/../../../../../../../../../xo-vm-backups/a52f0de6-98b9-61b7-c581-9bd48ed859ff/vdis/8aefbee2-3243-46dc-b520-71cd25857a51/e68625d0-0575-491b-9963-db5907eed28d/20181203T000755Z.vhd.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: mount_handle_open_input_parent_file: unable to open parent input file: /run/xo-server/mounts/43815fe3-0741-4f8a-9def-768d6f741eb9/xo-vm-backups/a52f0de6-98b9-61b7-c581-9bd48ed859ff/vdis/8aefbee2-3243-46dc-b520-71cd25857a51/e68625d0-0575-491b-9963-db5907eed28d/../../../../../../../../../xo-vm-backups/a52f0de6-98b9-61b7-c581-9bd48ed859ff/vdis/8aefbee2-3243-46dc-b520-71cd25857a51/e68625d0-0575-491b-9963-db5907eed28d/20181203T000755Z.vhd.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: mount_handle_open_input: unable to open parent input file.
Dec 04 12:02:38 xoce.netcast.rs xo-server[876]: vhdimount 20170223
Update: Just saw that file restore is working on the first delta backup (which is the initial full backup; added some new VMs to backup schedule yesterday). It seems it's not working on delta vhd files created after the update.
After first look it appears the parent name in the delta file is incorrect due to the leading slash returned by handler.list
.
I also got hit by this problem. All the base VHDs of our delta backups got nuked when it got past the retention period. This happened completely silently, I only found out because I happened to manually test our backups. It's possible all users of delta backup may be impacted by this...
By the way, I tested the latest master (cc26e378e5e06b2ef47da9c1c89c569a94478be8) and the problem still exists. Reproducing is simple: create new delta backup job with retention 1, trigger first run for full backup, then trigger a second run. The resulting backup is unusable, only the differencing VHD is kept.
I can confirm, reverting to 2946eaa15682e7b101577903645a5ee9361d1aad fixes the problem.
Thanks for your tests, I intend to get this fixed tomorrow :slightly_smiling_face:
Any updates maybe? :)
Our backups got nuked on Sunday too. Thx @jcharaoui for reporting, otherwise we wouldn't even catch it.
I restarted all delta backups from scratch after that. Just wondering now if I should revert back to 5.30.1 or wait a little longer, in case that the fix will come out soon.
@dsgagi Your backups are not broken, you don't need to delete them, file restore is just not working with them, I'll push a fix very soon :slightly_smiling_face:
Actually, same thing happened to us as @jcharaoui explained before.
We have a smart delta job for all running VM's with 7 files retention. Yesterday I noticed that base VHD files were deleted, only 7 differential files were in the folder.
After that, I moved all backups to another folder and started the job manually (only differentials that were left that is). XO started all full backup jobs, but I'm afraid the same thing will happen again when we reach the retention limit.
@julien-f I think this bug report is mixing two issues, one with file restore, as reported by OP, and another, with delta backups, where the base VHD files are really getting lost, as in completely lost, deleted from the filesystem.
Perhaps it would be less confusing for all if a new issue was opened for this.
The error message Unable to open source file
only appears in case of file restore and it's the issue I'm talking about here.
Yes please, open a new issue for the full being deleted when reaching the retention limit :+1:
I think it's maybe related.
File restore needs to link all vhd files to work, but it failed to open the parent file/files. I suppose the merge process failed for the same reason, and base VHD got deleted in the end.
What logic is used for deleting files at retention limit? File name or modification time?
Alright I opened #3784.
@dsgagi, @julien-f According to my tests the original issue with file restore path issue is fixed in the latest master.
I don't think so, I haven't pushed the fix yet…
I'll do some tests on my side.
Any update on this issue @julien-f ?
Yep, I'm working on it, I'll push in the next few hours :slightly_smiling_face:
I just pushed a fix for this, it will work for new VHD chains (all the deltas in chain need to have been created after this commit).
Context
Expected behavior
I expect that the vhdi from a delta backup is mounted so I can restore a file from a backup.
Current behavior
When I go to the web menu to Backup NG > File restore and select an image, to restore a file I get the dialog to select the backup. This works. After this I select the disk, but when I do this I get the error "Error while scanning disk".
If I check the logs I see following error:
I've made a local remote on the server on /mnt/backup. But when the vhdimount tries to select the file, it just uses "/mnt/backup" and not "/mnt/backup/". The web interface also does not allow for the input of "/mnt/backup/".
Kind regards,
Pieter