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

COLD_START_SNAPSHOT #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cognoquest
Copy link

I started using Hot Snapshots i.e. Backups with Snapshots while the VM was running and identified potential corruption to some of my backed-up VM services, hence the need to have those services stopped prior to the backup snapshot.

The first approach that I contemplated was to have the VM stop the sensitive services prior to the backup and then call the backup ghettoVCB script. The drawback to this solution was that the restore process where the services where stopped required to be restarted manually. The second approach was to use the POWER_VM_DOWN_BEFORE_BACKUP option of ghettoVCB. The draw-back of such approach was obviously the VM required to be stopped prior to the backup, but also the restart only occurs once the backup was completed. Not much I could do about powering-down the VM but I notice that I could speed-up the restart process by having a snapshot created immediately after the power down, this allowed the restart of the VM while it is being backed-up making the access to the VM faster.

I added the option COLD_START_SNAPSHOT to ghettoVCB code to provide faster access to the VM. I must confess that I am not the first to have had this idea. You will find similar approach here: #166 . You can thank @ctsde-markus owner of the thread: Reduce downtime with POWER_VM_DOWN_BEFORE_BACKUP=1 who gracefully encouraged me to release my branch of the code with a small design approach difference to my code described in the above thread #166

Implementation note: to enable the option COLD_START_SNAPSHOT you will be required to also enable the option POWER_VM_DOWN_BEFORE_BACKUP. I made this design code decision to make it clear to all users that when you choose the COLD_START_SNAPSHOT option it will require a power-down of the VM.

One last item, I believe I found a bug to the backup script while working on this option, which was difficult for me to ignore. You will find a thread of the issue here: #163 . I decided to add the fix to this branch. If you believe that I have made a ‘faux pas’ in doing so, I can be convinced of retracting the fix.

Enjoy

@ctsde-markus
Copy link

I'll review your pull request in the next days and report back here.

@Engidea
Copy link

Engidea commented Sep 4, 2020

Just wanted to say that you are not the only one wishing this

For a long list of reasons, backing up one of my VM takes around 12hours and I really need to be consistent i.e. powered down

If I may be picky, in the code, I would avoid having

if a && b then

if a && c then

I would write

if a then if b then if c then
Ah, forget the above, code formatting is broken

but, hey, thanks for your work

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

Successfully merging this pull request may close these issues.

3 participants