VMware Plugin: Fix CBT query handling#2152
Conversation
sebsura
left a comment
There was a problem hiding this comment.
This also contains the following section:
The changeId
(changed block ID) contains a sequence number in the form <UUID>/<nnn>
. If <UUID>
changes, it indicates that tracking information has become invalid, necessitating a full backup. Otherwise incremental backups can continue in the usual pattern.
- Do you know if pyvmomi already takes care of this somehow? (I.e. throwing an error)
- Should we take this into account somewhere ? Maybe throwing an error if the changeids are not compatible ?
If we decide not to handle this for now, we should probably at least write a comment for it in the code so that we may remember it in the future.
Also skip saving the CBT list in restoreobjects, as that is not necessary and could cause problems if the size of the CBT list is huge.
I checked pyvmomi, I couldn't find any code which check this. pyvmomi is mostly automatically generated code without special handling, it just returns what it gets from the API, including error handling. There are situations where |
The plugin now compares the UUID parts of the changeIds from restoreobject and current snapshot. If a mismatch is detected, the job will fail. The error message indicates that a new full level job run is required. |
sebsura
left a comment
There was a problem hiding this comment.
Thanks for the good work
Also skip saving the CBT list in restoreobjects, as that is not necessary and could cause problems if the size of the CBT list is huge. (cherry picked from commit faeba39)
Also skip saving the CBT list in restoreobjects, as that is not necessary and could cause problems if the size of the CBT list is huge. (cherry picked from commit faeba39)
The CBT query API call QueryChangedDiskAreas must be used repeatedly to get the complete change information. Additionally, for full backups the changeId * should not be used, the plugin now sends the whole capacity disk range so that bareos_vadp_dumper will effectively only use the allocated blocks information in this case. Also successful API connects and reconnects are now reported as informational job message for more clarity.
Using the grpc plugin, messages which go to stderr cause warnings, so the urllib3 SSL warning will be suppressed when verifyssl=no is set. Otherwise backup/restor jobs would unnessarily terminate with warning or error although it worked as expected.
Also skip saving the CBT list in restoreobjects, as that is not necessary and could cause problems if the size of the CBT list is huge.
The UUID part of the changeId from the restoreobject is now compared with the UUID part of the changeId from the current snapshot. A mismatch indicates that a new full level job run is required, so in that case the job will fail. The optional script reschedule_job_as_full.sh can be used to trigger new full jobs in that case automatically, as that is currently not possible from the plugin itself.
ba585b0 to
936c87d
Compare
Also skip saving the CBT list in restoreobjects, as that is not necessary and could cause problems if the size of the CBT list is huge. (cherry picked from commit faeba39)
Also skip saving the CBT list in restoreobjects, as that is not necessary and could cause problems if the size of the CBT list is huge. (cherry picked from commit faeba39)
The CBT query API call QueryChangedDiskAreas must be used repeatedly to get the complete change information. Additionally, for full backups the changeId * should not be used, the plugin now sends the whole capacity disk range so that bareos_vadp_dumper will effectively only use the allocated blocks information in this case. Also successful API connects and reconnects are now reported as informational job message for more clarity.
Thank you for contributing to the Bareos Project!
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality