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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 1024 MB 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.

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 1024 MB 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 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
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