[pve-devel] [PATCH storage 1/6] PBSPlugin: list_volumes: filter by vmid if specified

Fabian Ebner f.ebner at proxmox.com
Thu Jun 4 11:08:33 CEST 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/Storage/PBSPlugin.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm
index 3c0879c..65696f4 100644
--- a/PVE/Storage/PBSPlugin.pm
+++ b/PVE/Storage/PBSPlugin.pm
@@ -291,6 +291,7 @@ sub list_volumes {
 
 	next if !($btype eq 'vm' || $btype eq 'ct');
 	next if $bid !~ m/^\d+$/;
+	next if defined($vmid) && $bid ne $vmid;
 
 	my $btime = strftime("%FT%TZ", gmtime($epoch));
 	my $volname = "backup/${btype}/${bid}/${btime}";
-- 
2.20.1





More information about the pve-devel mailing list