[pve-devel] [RFC storage 11/23] extract backup config: delegate to backup provider if there is one
Fiona Ebner
f.ebner at proxmox.com
Tue Jul 23 11:56:12 CEST 2024
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
src/PVE/Storage.pm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
index aea57ab..b9913a4 100755
--- a/src/PVE/Storage.pm
+++ b/src/PVE/Storage.pm
@@ -1726,6 +1726,16 @@ sub extract_vzdump_config {
storage_check_enabled($cfg, $storeid);
return PVE::Storage::PBSPlugin->extract_vzdump_config($scfg, $volname, $storeid);
}
+
+ my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
+ my $log_function = sub {
+ my ($log_level, $message) = @_;
+ my $prefix = $log_level eq 'err' ? 'ERROR' : uc($log_level);
+ print "$prefix: $message\n";
+ };
+ if (my $backup_provider = $plugin->new_backup_provider($scfg, $storeid, $log_function)) {
+ return $backup_provider->extract_guest_config($volname, $storeid);
+ }
}
my $archive = abs_filesystem_path($cfg, $volid);
--
2.39.2
More information about the pve-devel
mailing list