/etc/vzdump.conf 增加
script: /etc/your-custom-script.sh
編輯 /etc/your-custom-script.sh 內容如下
#!/bin/bash
# $1=post-restart $2=snapshot <backup Mode> $3=100 <lxc id>
# STOREID=local
# TARGET=/var/lib/vz/dump/vzdump-lxc-100.tar.zst
# VMTYPE=lxc
if [ "$1" == "post-restart" ]; then
do something
fi
if [ "$1" == "job-end" ]; then
do something else
fi
exit 0
相關狀態
job-start Called once at the beginning of the entire backup job.
backup-start Called before the backup of an individual VM/container starts.
pre-stop Called before stopping or suspending a VM/container (in stop or suspend mode).
post-restart Called after restarting a VM/container (in suspend or snapshot mode).
backup-end Called after an individual VM/container backup finishes successfully.
log-end Called when the log file is complete and available.
job-end Called once at the end of the entire backup job if successful.
job-abort Called if the job is aborted or encounters a major error.
backup-abort Called if an individual VM backup fails.
沒有留言:
張貼留言