Skip to content
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

Export only a VM disk #11

Closed
wefixit-AT opened this issue Feb 28, 2016 · 3 comments
Closed

Export only a VM disk #11

wefixit-AT opened this issue Feb 28, 2016 · 3 comments

Comments

@wefixit-AT
Copy link
Owner

Today I had some troubles (found a bug in oVirt). Then I came to the idea to export only a selected disk to another location to split system and data files better. With the current solution all disks (system and data) will be copied, which could take a really long time for big data disks. The data disk should anyway be backed up with a solution which supports incremental or differential backups.

@seryeb
Copy link

seryeb commented Nov 11, 2016

Hi! This is a very interesting idea!

@alvarogomez93 and me have adapted the backup.py script for our interests: if only the system disk is bootable, we can create a snapshot with the bootable disk, and not the "data" disk:

109a110,122
>             # Get the Bootable Disk
>             disks = vm.disks
> 
>             discoBootable = None
>             for discoi in disks.list():
>                 if discoi.bootable == True:
>                     discoBootable = discoi
>                     break
> 
>             discoSnap= params.Disks()
>             discoSnap.add_disk(discoBootable)
> 
> 
112c125
<         
---
> 
117a131
> 
123c137
<                     vm.snapshots.add(params.Snapshot(description=config.get_snapshot_description(), vm=vm))
---
>                     vm.snapshots.add(params.Snapshot(description=config.get_snapshot_description(), disks=discoSnap, vm=vm))
147c161
<         
---
> 
193a208
> 

@wefixit-AT
Copy link
Owner Author

Can you create a pull request

@mkhoroshev
Copy link

seryeb, thank you! Working like a charm! It will be more flexible if implement a config option like a boot_disk_only: yes

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

No branches or pull requests

3 participants