[pve-devel] [PATCH pve-docs 1/1] add pre/post-restore events to example hookscript
Daniel Tschlatscher
d.tschlatscher at proxmox.com
Fri Nov 11 14:58:31 CET 2022
On 11/10/22 16:33, Stefan Hanreich wrote:
> Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
> ---
> examples/guest-example-hookscript.pl | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/examples/guest-example-hookscript.pl b/examples/guest-example-hookscript.pl
> index adeed59..19fe213 100755
> --- a/examples/guest-example-hookscript.pl
> +++ b/examples/guest-example-hookscript.pl
> @@ -54,6 +54,20 @@ if ($phase eq 'pre-start') {
>
> print "$vmid stopped. Doing cleanup.\n";
>
> +} elsif ($phase eq 'pre-restore') {
> +
> + # Phase 'pre-restore' will be executed before restoring a backup. (via UI or
> + # CLI)
> +
> + print "Restoring $vmid from backup.\n";
> +
> +} elsif ($phase eq 'post-restore') {
> +
> + # Phase 'pre-restore' will be after before restoring a backup. (via UI or
> + # CLI)
Nit: should say "'post-restore' will be executed after [...]"
> +
> + print "$vmid finished restoring from backup.\n";
> +
> } else {
> die "got unknown phase '$phase'\n";
> }
More information about the pve-devel
mailing list