Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Delta Backup] Avoid full export after VDI migrate #2896

Closed
snimmerjahn opened this issue Apr 24, 2018 · 6 comments · May be fixed by #4265
Closed

[Delta Backup] Avoid full export after VDI migrate #2896

snimmerjahn opened this issue Apr 24, 2018 · 6 comments · May be fixed by #4265

Comments

@snimmerjahn
Copy link

snimmerjahn commented Apr 24, 2018

Context

  • XO origin: XO Appliance
  • Versions:
    • xo-web: 5.18.3
    • xo-server: 5.18.3

Current behavior

The Backup NG Delta mode failed, after a vdi was migrate into another storage repository.

The vdi got a new uuid after migration. I think that is the problem.

This is the error message:

 [{
  "message":"ENOENT: no such file or directory, scandir '/run/xo-server/mounts/d622621a-b5d6-46ca-a3b6-68e36bcf7d88/xo-vm-backups/0769dc08-c4f1-ec7c-0893-a4c1b19bc204/vdis/471f2f4e-810e-47ba-af4c-d3b6152a575f/414d76e2-f886-41b9-8c5a-fbbdca11196a'",
  "stack":"Error: ENOENT: no such file or directory, scandir '/run/xo-server/mounts/d622621a-b5d6-46ca-a3b6-68e36bcf7d88/xo-vm-backups/0769dc08-c4f1-ec7c-0893-a4c1b19bc204/vdis/471f2f4e-810e-47ba-af4c-d3b6152a575f/414d76e2-f886-41b9-8c5a-fbbdca11196a'\n at Error (native)",
  "errno":-2,
  "code":"ENOENT",
  "syscall":"scandir",
  "path":"/run/xo-server/mounts/d622621a-b5d6-46ca-a3b6-68e36bcf7d88/xo-vm-backups/0769dc08-c4f1-ec7c-0893-a4c1b19bc204/vdis/471f2f4e-810e-47ba-af4c-d3b6152a575f/414d76e2-f886-41b9-8c5a-fbbdca11196a"
}]
@julien-f
Copy link
Member

Hmm, that may be it indeed, simply remove the snapshot associated to the backup job on the source VM to force a new full and everything should be back in order :)

@snimmerjahn
Copy link
Author

Ok, that works.
Would it be possible, that the backup job detect this automatically? Maybe as a new feature in a future release ;-)

@olivierlambert
Copy link
Member

This is already planned to be fixed.

@olivierlambert
Copy link
Member

@julien-f I think this could be the opportunity to make a VDI tracking feature. Ie to put the VDI original UUID in the other-config and if we don't have a previous VDI during a new run, before fallback to a VDI new folder, trying to find the previous UUID in other-config.

Recently I did a lot of SR migration, and it was really boring to clean the previous VDIs folders on the remote.

@julien-f
Copy link
Member

There is no need to clean manually, Backup NG does not leave unused VHD files.

But I agree it's not ideal to do a full export when a delta would be possible, but it's probably not trivial to implement.

@julien-f julien-f changed the title Delta Backup failed after VDI migrate [Delta Backup] Avoid full export after VDI migrate Jun 15, 2018
@julien-f julien-f added this to the backup milestone Jun 15, 2018
@julien-f julien-f modified the milestones: backup, 5.29 Oct 3, 2018
@julien-f julien-f self-assigned this Oct 3, 2018
@julien-f julien-f modified the milestones: [Frozen] 5.29, 5.30 Oct 18, 2018
@julien-f julien-f modified the milestones: [Frozen] 18.14, 18.15 Nov 16, 2018
@julien-f julien-f modified the milestones: [Frozen] 18.15, 19.1, 19.3 Jan 9, 2019
@julien-f julien-f modified the milestones: [Frozen] 19.3, 19.4 Feb 8, 2019
@julien-f julien-f modified the milestones: [Frozen] 19.4, 19.5 Feb 27, 2019
@badrAZ badrAZ modified the milestones: [Frozen] 19.5, 19.6, [Frozen] 19.6, 19.7 Mar 26, 2019
@badrAZ badrAZ modified the milestones: [Frozen] 19.10, 19.11 May 29, 2019
julien-f added a commit that referenced this issue May 29, 2019
Fixes #2896

Store its UUID in metadata to avoid a delta afteter a migration.
@badrAZ badrAZ modified the milestones: [Frozen] 19.11, 19.12 Jun 13, 2019
@badrAZ badrAZ modified the milestones: [Frozen] 19.12, 19.13 Jun 27, 2019
@pdonias pdonias modified the milestones: [Frozen] 19.15, 19.17 Jul 31, 2019
@badrAZ badrAZ modified the milestones: [Frozen] 19.17, 19.18 Sep 5, 2019
@badrAZ badrAZ modified the milestones: [Frozen] 19.18, 19.19 Sep 20, 2019
julien-f added a commit that referenced this issue Sep 25, 2019
Fixes #2896

Store its UUID in metadata to avoid a delta afteter a migration.
@Rajaa-BARHTAOUI Rajaa-BARHTAOUI modified the milestones: [Frozen] 19.19, 19.20 Sep 27, 2019
@Rajaa-BARHTAOUI Rajaa-BARHTAOUI modified the milestones: 19.20, [Frozen] 19.21 Oct 11, 2019
@Rajaa-BARHTAOUI Rajaa-BARHTAOUI modified the milestones: [Frozen] 19.21, 19.22 Oct 28, 2019
@Rajaa-BARHTAOUI Rajaa-BARHTAOUI modified the milestones: 19.22, 19.23 Nov 22, 2019
@pdonias pdonias removed this from the [Frozen] 19.23 milestone Dec 2, 2019
@olivierlambert
Copy link
Member

It's a bit risky to do that in SMAPIv1, since the VHD is modified when copied to a new SR. I prefer to be careful and not doing that for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants