BassT23/Proxmox

Trigger snapshot or backup before update

Closed this issue · 7 comments

elbim commented

A nice (configurable) feature would be to trigger a snapshot or backup of the machine, before starting the update. That way, you can always roll back very fast and easy, in case an update broke the machine.
Snapshot LXC: pct snapshot $CONTAINER \"Update_$(date '+%Y%m%d_%H%M%S')\
Snapshot QM: qm snapshot $VM \"Update_$(date '+%Y%m%d_%H%M%S')\

elbim commented

I forked the master branch and added the code patterns for snapshots to update.conf and update.sh. Maybe if you can spare some time, you'll have a look and give it a try. I hope I got your variable naming right ;)
Btw. really like your scripting style.

Hello, thanks for your work and if you can make a pull request of if so we can review it and merge !

elbim commented

ah, so that's what these buttons are for :) never commited code to other projects using github, so i hope i got it right.

please have a look here: #84

need to fix the code.

My first problem is: snapshot feature is not available - which ends in exit code.
Also need to implement the feature on another line in the script.

This issue is stale because it has been open for 30 days with no activity.

Please check out the new develop version :)
Snapshot now work, if disk system allow it.