vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
767 stars 262 forks source link

[Backup NG] Backup size on Restore page is way off #4316

Closed mas90 closed 5 years ago

mas90 commented 5 years ago

Context

Expected behavior

Backup sizes shown on /backup-ng/restore should be accurate.

Current behavior

Backup size is very much higher than the actual disk usage, for many (not all) VMs.

screenshot-xo malc org uk-2019 06 30-17-27-05

One example: the UI shows that a VM's backups total 837.83 GiB (3 full + 17 delta backups). Clicking the delete button shows accurate sizes for the full backups (about 2 GiB each). Actual file size on disk is 31 GiB (of which 25 GiB are deltas).

Additionally, several of my VMs show the exact same backup size (837.83 GiB) even though the backups on disk are different sizes.

The backup remote is NFS + zfs; zfs has compression turned on so the actual disk usage is lower (18 GiB) in case that is throwing off the calculation somehow.

Enishowk commented 5 years ago

Hi, to be sure, you only have the display for full vm backup when you click on delete button. There is no display for the delta?

Because, currently we only display the total size of full vm backup on the column "size". Later, we will add to this total, those of delta backup

mas90 commented 5 years ago

Correct, I only see sizes for full backups: screenshot-xo malc org uk-2019 07 03-20-17-44

Size column for that VM's backups currently reads 812.1 GiB -- if it is only counting full backups it should read 6.1 GiB.

Enishowk commented 5 years ago

Hi, I need more information like the json of your backups on this remote. Can you execute the command xo-cli backupNg.listVmBackups?

If you don't know xo-cli, it's a CLI tool that allows you to interact with xo-server: https://xen-orchestra.com/docs/xo-cli.html

Installation of xo-cli

sudo -s npm i -g xo-cli

Connection to xo-server

xo-cli --register \ \ \

Get id of your remote where the backup is located

xo-cli remote.getAll

The magic command

xo-cli backupNg.listVmBackups remotes=json:'["\"]' > dump.json

Thanks for sending me the dump. :) I'm available if you need help.

mas90 commented 5 years ago

Here's the backupNg.listVmBackups json: https://www.cl.cam.ac.uk/~mas90/tmp/dump.json

Thanks for investigating!