-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
backup: simple NAS backup plugin for KVM #9451
backup: simple NAS backup plugin for KVM #9451
Conversation
This is an experimental simple NAS backup plugin for KVM which may be later expanded for other hypervisors. This backup plugin aims to use shared NAS storage on KVM hosts such as NFS or CephFS, which is used to backup fully cloned VMs for backup & restore operations. This may not be as efficient and performant as some of the other B&R providers, but maybe useful for some KVM environments. Signed-off-by: Rohit Yadav <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9451 +/- ##
============================================
+ Coverage 4.12% 15.61% +11.49%
- Complexity 0 12118 +12118
============================================
Files 383 5555 +5172
Lines 31354 486283 +454929
Branches 5551 61315 +55764
============================================
+ Hits 1293 75945 +74652
- Misses 29915 401966 +372051
- Partials 146 8372 +8226
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Update: take backup & delete backup implemented for NFS; TBD/TODO more operations. |
Each backup repository is for a specific zone & provider. Eack NAS bkcp offering is tied to a back repo & each bkup offer assinged to VM -> defined its backup repository Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
@blueorangutan package |
@rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
engine/schema/src/main/resources/META-INF/db/schema-41910to42000.sql
Outdated
Show resolved
Hide resolved
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java
Show resolved
Hide resolved
server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments, overall code looks good.
…00.sql Co-authored-by: Suresh Kumar Anaparti <[email protected]>
…00.sql Co-authored-by: Suresh Kumar Anaparti <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]> (cherry picked from commit ecfeb04026e1bbf13dc22bb0aa713677c7708bb8) Signed-off-by: Rohit Yadav <[email protected]>
Signed-off-by: Rohit Yadav <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Works with KVM EL8 ,EL9, Ubuntu22,Ubuntu24
- Backup and restore works fine. All Full backups.
- Supported backup repository NFS, tested using QNAP.
- Parallel backups and restore
- Parallel backups and restore per host.
- Multiple Linux distros and Windows.
- Multiple Backup repositories.
- Backup schedules.
- Admin and users can trigger backups.
- Primary storages of type NFS and local storage.
- Upgrade from 4.19.
Limitations observed and possible improvements( some are limitations of the B&R Framework itself)
- Restoring expunged instances.
- Restoring unmanaged instances.
- More backup repository type support.
- CKS support
- Agent logging could be improved.
@blueorangutan package |
@rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11006 |
Few comments will be addressed as improvements in a subsequent PR. |
@blueorangutan test |
@rohityadavcloud a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Merging this based on reviews, manual QA and GitHub Actions tests. Will continue further test matrix on health check PR. |
[SF] Trillian test result (tid-11369)
|
[SF] Trillian test result (tid-11377)
|
This is a simple NAS backup plugin for KVM which may be later expanded for other hypervisors. This backup plugin aims to use shared NAS storage on KVM hosts such as NFS (or CephFS and others in future), which is used to backup fully cloned VMs for backup & restore operations. This may NOT be as efficient and performant as some of the other B&R providers, but maybe useful for some KVM environments who are okay to only have full-instance backups and limited functionality. Design & Implementation follows the `networker` B&R plugin, which is simply: - Implement B&R plugin interfaces - Use cmd-answer pattern to execute backup and restore operations on KVM host when VM is running (or needs to be restored) - instead of a B&R API client, relies on answers from KVM agent which executes the operations - Backups are full VM domain snapshots, copied to a VM-specific folders on a NAS target (NFS) along with a domain XML - Backup uses libvirt feature: https://libvirt.org/kbase/live_full_disk_backup.html orchestrated via virsh/bash script (nasbackup.sh) as the libvirt-java lacks the bindings - Supported instance volume storage for restore operations: NFS & local storage Refer the doc PR for feature limitations and usage details: apache/cloudstack-documentation#429 Signed-off-by: Rohit Yadav <[email protected]> Co-authored-by: Pearl Dsilva <[email protected]> Co-authored-by: Abhishek Kumar <[email protected]> Co-authored-by: Suresh Kumar Anaparti <[email protected]>
This is a simple NAS backup plugin for KVM which may be later expanded for other hypervisors. This backup plugin aims to use shared NAS storage on KVM hosts such as NFS (or CephFS and others in future), which is used to backup fully cloned VMs for backup & restore operations. This may NOT be as efficient and performant as some of the other B&R providers, but maybe useful for some KVM environments who are okay to only have full-instance backups and limited functionality.
Design & Implementation follows the
networker
B&R plugin, which is simply:Refer the doc PR for feature limitations and usage details:
apache/cloudstack-documentation#429
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots
Each backup offering map to a Backup repository that takes in backup storage details (address/url, credentials/mount options):
Rest is same as B&R feature works; we assign such offering to a VM and backup once completed shows up in the list: