[pve-devel] [RFC storage v2 11/25] extract backup config: delegate to backup provider if there is one
Fiona Ebner
f.ebner at proxmox.com
Tue Aug 13 15:28:15 CEST 2024
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
Changes in v2:
* Adapt to method rename.
src/PVE/Storage.pm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
index aea57ab..8993ba7 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->restore_get_guest_config($volname, $storeid);
+ }
}
my $archive = abs_filesystem_path($cfg, $volid);
--
2.39.2
More information about the pve-devel
mailing list