]> git.proxmox.com Git - pve-storage.git/commitdiff
PBS Plugin: list_volumes: add ctime
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 4 Mar 2020 10:46:18 +0000 (11:46 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 6 Mar 2020 18:26:45 +0000 (19:26 +0100)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
PVE/Storage/PBSPlugin.pm

index fcb1597ecb8f174c42f5ce64d8b3bf63977847b2..2a4c19c9dd8d62587226dbd4ca6df394c6c51a02 100644 (file)
@@ -282,18 +282,21 @@ sub list_volumes {
     foreach my $item (@$data) {
        my $btype = $item->{"backup-type"};
        my $bid = $item->{"backup-id"};
-       my $btime = $item->{"backup-time"};
+       my $epoch = $item->{"backup-time"};
        my $size = $item->{size} // 1;
 
        next if !($btype eq 'vm' || $btype eq 'ct');
        next if $bid !~ m/^\d+$/;
 
-       $btime = strftime("%FT%TZ", gmtime($btime));
+       my $btime = strftime("%FT%TZ", gmtime($epoch));
        my $volname = "backup/${btype}/${bid}/${btime}";
 
        my $volid = "$storeid:$volname";
 
-       my $info = { volid => $volid , format => "pbs-$btype", size => $size, content => 'backup', vmid => int($bid) };
+       my $info = {
+           volid => $volid , format => "pbs-$btype", size => $size,
+           content => 'backup', vmid => int($bid), ctime => $epoch
+       };
 
        push @$res, $info;
     }