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

Reduce downtime with POWER_VM_DOWN_BEFORE_BACKUP=1 #166

Open
ctsde-markus opened this issue Feb 8, 2019 · 6 comments
Open

Reduce downtime with POWER_VM_DOWN_BEFORE_BACKUP=1 #166

ctsde-markus opened this issue Feb 8, 2019 · 6 comments

Comments

@ctsde-markus
Copy link

By moving the power-on block up to right before the actual backup with vmkfstools takes place and taking a snapshot even for VMs with POWER_VM_DOWN_BEFORE_BACKUP=1 the downtime for clean (or "cold") backups can be greatly reduced. This makes sense for db servers and Windows domain controllers.

Lately i had a few unsuccessful (or painful) restores of Windows VMs (refusing to boot after restore) and so i increasingly tend to set POWER_VM_DOWN_BEFORE_BACKUP=1 for almost every Windows VM. Some of them are Servers, so short downtimes make a difference.

I made a pull request #165 to implement this. Please review and test it to make sure i didn't forget anything.

@cognoquest
Copy link

cognoquest commented Feb 9, 2019

@ctsde-markus, thank you for sharing your code.
I like your idea/concept of restarting the VM prior to finishing its backup. My only concern if I am not mistaken is you have taken the approach that all will want to create a snapshot for that option. I have little ESXI expertise but I believe that you can not take a snapshot of a VM that is using a passthrough configuration and possibly more scenarios.
I started using ghettoVCB a few weeks ago and I also found that it would make sense to have the functionality you describe but I took a different approach. I did not touch the implementation of POWER_VM_DOWN_BEFORE_BACKUP=1, I added a new option: COLD_START_SNAPSHOT=1 with the same functionality. I also created a Branch for this option but I did not have your wisdom to push it, for a few reason: My week expertise at ESXI, ghettoVCB, GIT and also thinking that I was probably the only one wanting this option.
I find this a little awkward promoting my approach when you are asking the community to review and test your code that I am sure serves you well and would serve other well to. I apologies for doing so.

@ctsde-markus
Copy link
Author

ctsde-markus commented Feb 10, 2019

Nonono!

Don't apologise for that.

Indeed i didn't consider passthrough (i'm not using it at all). Making a new configuration variable for snapshotting and restarting a powered down VM before the backup on request is the better approach here.

PS: If you already have working code, it's really simple to create a pull request. You just need an account on github (you obviously have that). Then you just fork the original project, checkout a local working copy of your fork on your device (git clone $URL) and create a branch for the changes (git branch $BRANCHNAME). Then you change the code, commit the changes locally (git add $CHANGED_FILE && git commit) and push them back to github (git push). An when you think it's good enough, you just make a pull request online on github.

Those helped me:

@cognoquest
Copy link

Thank you for the kind words @ctsde-markus and the much needed help with git. I am going to follow your instructions and attempt to push that set of changes. Regards.

@cognoquest
Copy link

Hello @ctsde-markus , I am hopping to draw from your knowledge for this problem that I am having with git. I created a branch added and committed the code without a problem. But the push is not working for me.

git push -u origin cold-start-snapshot

remote: Permission to lamw/ghettoVCB.git denied to cognoquest. fatal: unable to access 'https://github.com/lamw/ghettoVCB.git/': The requested URL returned error: 403

Obviously I am having permission issues. I see in documentation that I need the permission from the owner but I am a little lost on how to proceed? Thanks in advance for the help

@ffejtable
Copy link

I don't really use git much, so my information is somewhat generic.. You can't push to "lamw", that belongs to another user.. If you haven't done so, you need to fork the project, and then you will have your own location to push changes.. Will be something like https://github.com/cognoquest/ghettoVCB.git/ i think you need to push there, then ask lamw to do a pull request.

@cognoquest
Copy link

Oh I believe I missed the following step: 'forking the project' first, oops, yes indeed that makes sense to me now. @ffejtable , you may not use git much but you are allot better at this than me. Thanks

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