Skip to content

CA-409710: Modify the default backup parameters #6440

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

Merged
merged 1 commit into from
May 7, 2025

Conversation

BengangY
Copy link
Contributor

@BengangY BengangY commented Apr 25, 2025

The current default count of metadata backup files is 25. This number is too
many. For the customer in XSI-1873, the backup disk is 500 MB, and each backup
file is about 35 MB. So it can't keep 25 backup files.

A quick solution is to modify the backup parameters, including:

  1. Reduce the default count of metadata backup files to 12.
  2. Increase the backup VDI size to 1 GiB so it can keep more backup files.

@BengangY BengangY force-pushed the private/bengangy/CA-409710 branch from 9c41a7e to 97f1b79 Compare April 25, 2025 07:32
@BengangY BengangY force-pushed the private/bengangy/CA-409710 branch from 97f1b79 to 1b24182 Compare April 25, 2025 07:57
@BengangY BengangY marked this pull request as ready for review April 25, 2025 09:06
@lindig
Copy link
Contributor

lindig commented Apr 25, 2025

The backup VDI is created by this script. So another solution is to create a larger VDI or to decide dynamically how many generations to keep.

@Vincent-lau
Copy link
Contributor

Vincent-lau commented Apr 25, 2025

Is it possible to make the backup disk larger? 500 MB seems to be quite small. Perhaps double the disk instead of half the back up file limit?

@lindig
Copy link
Contributor

lindig commented Apr 25, 2025

The number of generations kept is only the default and there is an option to override this. So what this change does is changing the default. But like I said above, we could also change the size of the VDI. The script already emits an alert when it is running low on space.

   vdi_uuid=$(${XE} vdi-create virtual-size=500MiB sr-uuid="${sr_uuid}" 

A change here obviously would only take effect when no VDI already exists.

[root@genus-34-35d ~]# xe-backup-metadata -h
Usage: /opt/xensource/bin/xe-backup-metadata [-h] [-i] [-u <SR UUID>]

 -h: Display this help message
 -c: Create a backup VDI if one cannot be found (default: false)
 -i: Initialize the backup VDI before performing the backup
 -u: UUID of the SR you wish to backup to
 -d: Dont perform a backup, but leave the disk mounted in a shell
 -k  Number of older backups to preserve (default: 25)
 -n: Just try to find a backup VDI and stop the script after that
 -f  Force backup even when less than 10% free capacity is left on the backup VDI
 -v: Verbose output


Use the -d option to examine the backup VDI, and restore it if necessary.
It is a good idea to copy the backup onto the control domain before
restoring it via the xe pool-database-restore CLI command.

@BengangY BengangY force-pushed the private/bengangy/CA-409710 branch from 1b24182 to d50d5ac Compare April 28, 2025 09:22
@BengangY BengangY changed the title CA-409710: Reduce the default metadata backups count CA-409710: Modify the default backup parameters Apr 28, 2025
@BengangY BengangY force-pushed the private/bengangy/CA-409710 branch from d50d5ac to 070f514 Compare May 6, 2025 10:00
@BengangY BengangY requested review from robhoes and minglumlu May 6, 2025 10:30
Copy link
Contributor

@lindig lindig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would have used "GiB" but GB works, too.

Copy link
Contributor

@Vincent-lau Vincent-lau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, as long as reducing the number of histories does not cause some violations of requirements

The current default count of metadata backup files is 25. This number is too
many. For the customer in XSI-1873, the backup disk is 500 MB, and each backup
file is about 35 MB. So it can't keep 25 backup files.

A quick solution is to modify the backup parameters, including:
1. Reduce the default count of metadata backup files to 12.
2. Increase the backup VDI size to 1 GiB so it can keep more backup files.

Signed-off-by: Bengang Yuan <[email protected]>
@BengangY BengangY force-pushed the private/bengangy/CA-409710 branch from 070f514 to 862732d Compare May 7, 2025 01:43
@BengangY BengangY added this pull request to the merge queue May 7, 2025
Merged via the queue into xapi-project:master with commit 0482b62 May 7, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants