list volumes: also return backup type for backups
Otherwise, there is no storage-agnostic way to filter by backup group. Call it subtype, to not confuse it with content type, and to be able to re-use it for other content types than backup, if the need ever arises. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
5ef50a8262
commit
c66e0b8a0a
@ -688,6 +688,7 @@ sub list_volumes {
|
||||
content => 'backup',
|
||||
vmid => int($bid),
|
||||
ctime => $epoch,
|
||||
subtype => $btype eq 'vm' ? 'qemu' : 'lxc', # convert to PVE backup type
|
||||
};
|
||||
|
||||
$info->{verification} = $item->{verification} if defined($item->{verification});
|
||||
|
||||
@ -1164,6 +1164,7 @@ my $get_subdir_files = sub {
|
||||
my $archive_info = eval { PVE::Storage::archive_info($fn) } // {};
|
||||
|
||||
$info->{ctime} = $archive_info->{ctime} if defined($archive_info->{ctime});
|
||||
$info->{subtype} = $archive_info->{type} // 'unknown';
|
||||
|
||||
if (defined($vmid) || $fn =~ m!\-([1-9][0-9]{2,8})\-[^/]+\.${format}$!) {
|
||||
$info->{vmid} = $vmid // $1;
|
||||
|
||||
Reference in New Issue
Block a user