one icon indicating copy to clipboard operation
one copied to clipboard

Allow Single VM `Reset` backup for backupjobs

Open Franco-Sparrow opened this issue 1 year ago • 0 comments

Description

Cant reset backup from the backupjob actions, without loose all backups done, if configured for MODE: INCREMENT Lets suppose tha a VM belongs to a backupjob with following configuration:

BACKUP_VMS="64"
BACKUP_VOLATILE="YES"
DATASTORE_ID="100"
EXECUTION="SEQUENTIAL"
FS_FREEZE="AGENT"
INCREMENT_MODE="CBT"
KEEP_LAST="3"
MODE="INCREMENT"

I want to force a reset backup for all VMs inside the backupjob, or somehow, to specific VMs from the backupjob. I can only reset the backup chain, using the single backup operations from the VM tab. What we have right now with the backupjob is a forever incremental (if configured with MODE: INCREMENT) with a limit defined by KEEP_LAST. This means that I will only have one increment chain of backups for each VM, belonging the backupjob, with a limit of 3 increments (in this case).

Use case

How are you going to use this new feature? Why do you need it?

If somehow, fail the last backup for one of those VMs, belonging the backupjob, I would like to reset the backup chain without loose all the increments before the failed backup. There is no option for a reset backup in the backupjob, I can only have one backup chain for increments and the only way I could imagine to reset the backup chain is by deleting the old backup image (with the FULL and all the INC done so far).

We cant use Single VM backups, so if you try to backup or reset backup from the backup action on the VM tab, this will do nothing. If you try to force the reset backup using the CLI it will fail (using the VM backups):

onevm backup -d 100 64
Error creating VM backup: [one.vm.backup] Unable to start an individual backup for the Virtual Machine, it is part of Backup Job ID 5

I need this, because is allways a good idea to have more than one backup chain (backup images) per VM. Single VM backups works on this way, where KEEP_LAST define the limit of backup images that you could have for a given VMs, beside the ammount of increments per increment backup chain.

Exploring the onebackupjob options, there is no way to do it using CLI (same for Sunstone):

onebackupjob backup --help
## USAGE
backup <range|backupjobid_list>
        Start the Backup Job execution.
        valid options: end, hourly, monthly, schedule, weekly, yearly

## OPTIONS
     --end number|TIME         ----
     --hourly hour             Repeats the schedule action with the given hourly
                               frequency. For example (every 5 hours): onevm
                               resume 0 --schedule "09/23 14:15" --hourly 5
     --monthly days            Repeats the schedule action the days of the month
                               specified, it can be a number between 1,31
                               separated with commas. For example: onevm resume
                               0 --schedule "09/23 14:15" --monthly 1,14
     --schedule TIME           Schedules this action to be executed afterthe
                               given time. For example: onevm resume 0
                               --schedule "09/23 14:15"
     --weekly days             Repeats the schedule action the days of the week
                               specified, it can be a number between 0 (Sunday)
                               to 6 (Saturday) separated with commas. For
                               example: onevm resume 0 --schedule "09/23 14:15"
                               --weekly 0,2,4
     --yearly days             Repeats the schedule action the days of the year
                               specified, it can be a number between 0,365
                               separated with commas. For example: onevm resume
                               0 --schedule "09/23 14:15" --yearly 30,60
     -v, --verbose             Verbose mode
     -h, --help                Show this message
     -V, --version             Show version and copyright information
     --user name               User name used to connect to OpenNebula
     --password password       Password to authenticate with OpenNebula
     --endpoint endpoint       URL of OpenNebula xmlrpc frontend

PS: The retry action for failed backups on the baclupjob helps to continue with your forever incremental, but the backupjob solution should not avoid you to reset your backups.

Interface Changes

  • Storage
  • Sunstone

Additional Context Please feel free to add any other context or screenshots about the feature request here. Or any other alternative you have considered to address this new feature.

Progress Status

  • [ ] Code committed
  • [ ] Testing - QA
  • [ ] Documentation (Release notes - resolved issues, compatibility, known issues)

Franco-Sparrow avatar Jan 23 '24 16:01 Franco-Sparrow