Hook script and vzdump options

methil

Renowned Member
Jul 1, 2013
9
0
66
I am playing with the vzdump hook script and cannot get for the life of me to dynamically change the : pbs-change-detection-mode
I tried setting the pbs-change-detection-mode through ENV variable but look like it is not there.

: === VZDUMP HOOK ENVIRONMENT VARIABLES (job-start) ===
: LC_ALL=C
: LVM_SUPPRESS_FD_WARNINGS=1
: PWD=/
: SHLVL=1
: STOREID=pbsbackups
: _=/usr/bin/env

: === VZDUMP HOOK ENVIRONMENT VARIABLES (backup-start) ===
: HOSTNAME=testbkp
: LC_ALL=C
: LVM_SUPPRESS_FD_WARNINGS=1
: PWD=/
: SHLVL=1
: STOREID=pbsbackups
: TARGET=ct/3000/2026-09-04T16:57:00Z
: VMTYPE=lxc
: _=/usr/bin/env


The goal here is to have the job run with pbs-change-detection-mode set to metadata mode by default but on specific days of month change to data mode to make sure we have all files and don't run into the case of a file that was modify without mtime been updated and never get into the backup again.

Before someone say it: I know i could set a job with the default set to data for those days but we don't manage all schedules and customers are stupid and will never understand why a file was not in the backup because of that edge case.

Right now i have a cron job that change the vzdump.conf default to data mode for those days and switch it back to metadata once the period is over.

Any suggestion?
 
What environment variables are you referring to? the backup-client? Or what is the actual variable you have used?

As far as I know, at least for the backup-client, there is no ENV variable for change detection mode.

https://pbs.proxmox.com/docs/backup-client.html#environment-variables

NB: also, wouldn't the environment variables be overwritten anyway, if the command line "overrides" the pbs-change-detection-mode explicit with the command line using the UI settings of that job?
 
Last edited: