On 16.03.22 12:04, Fabian Ebner wrote: > Am 16.12.21 um 13:12 schrieb Fabian Ebner: >> In command_line(), notes are printed, quoted, but otherwise as is, >> which is a bit ugly for multi-line notes. But it is part of the >> commandline. >> >> Signed-off-by: Fabian Ebner <f.eb...@proxmox.com> >> --- >> src/PVE/VZDump/Common.pm | 14 +++++++++++++- >> 1 file changed, 13 insertions(+), 1 deletion(-) >> >> diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm >> index 83d7413..5bb35ec 100644 >> --- a/src/PVE/VZDump/Common.pm >> +++ b/src/PVE/VZDump/Common.pm >> @@ -233,7 +233,19 @@ my $confdesc = { >> type => 'string', >> description => 'Backup all known guest systems included in the >> specified pool.', >> optional => 1, >> - } >> + }, >> + notes => { >> + type => 'string', >> + description => "Notes to add to the backup(s).", >> + requires => 'storage', >> + optional => 1, >> + }, > > Quoting off-list discussion here, where it belongs and so we don't > forget about it ;) > > With regard to fixing https://bugzilla.proxmox.com/show_bug.cgi?id=438 > after all those years. > > Fabian G.: > we could offer something like a simple template system that allows > substitution of certain variables (like name, or source node > hostname/clustername, ..). or just a boolean switch for setting VM/CT > $HOSTNAME from $CLUSTER/$NODENAME (or an enum, with > [job-comment,hostname,long,none] where long is that, and hostname is > just the guest hostname, and job-comment is the comment of the vzdump > job if one is set) > > Me: > The template variant would be the most flexible one and would avoid the > need for a second vzdump option besides --notes. Ideally, support for it > would be there from the beginning though, as otherwise it will stop > working for a user wanting to literally set $HOSTNAME when we add it ;) > The downside is that it doesn't match the volume-level --notes option, > but I don't think that should be a big deal. > > Fabian G.: > well it could just be called notes-template for vzdump to disambiguate?
fwiw, I believe I commented that approach in the internal chat a while ago, but as its search functions are abysmal I don't find it anymore. IIRC, just extend what we have now and allow a fixed set of {VARS} (vmid, guest name, host name, job-id, ..?). While extending one has a slight chance of changing an existing setup I find this very unlikely in this specific case, as we had no such feature whatsoever and it makes not sense in any practical example to use such special strings for a backup comment. That said, if one can whip up another reason besides backward compat for having a separate flag to turn this on/off then feel free to comment. I mean, for the backup jobs itself it could have some value to differ between the comment about the job itself and a comment template for the resulting backups. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel