From 532c6c5dc338589369ab69e299f9acb368e60dc0 Mon Sep 17 00:00:00 2001 From: Ashish Amarnath Date: Wed, 20 May 2020 09:05:23 -0700 Subject: [PATCH] increment restic volumesnapshot count after successful pvb create (#2542) Signed-off-by: Ashish Amarnath --- changelogs/unreleased/2542-ashish-amarnath | 1 + pkg/restic/backupper.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/2542-ashish-amarnath diff --git a/changelogs/unreleased/2542-ashish-amarnath b/changelogs/unreleased/2542-ashish-amarnath new file mode 100644 index 000000000..f22d40875 --- /dev/null +++ b/changelogs/unreleased/2542-ashish-amarnath @@ -0,0 +1 @@ +increment restic volumesnapshot count after successful pvb create diff --git a/pkg/restic/backupper.go b/pkg/restic/backupper.go index 589b33cf3..432b414e0 100644 --- a/pkg/restic/backupper.go +++ b/pkg/restic/backupper.go @@ -158,11 +158,11 @@ func (b *backupper) BackupPodVolumes(backup *velerov1api.Backup, pod *corev1api. } volumeBackup := newPodVolumeBackup(backup, pod, volume, repo.Spec.ResticIdentifier, pvc) - numVolumeSnapshots++ if volumeBackup, err = b.repoManager.veleroClient.VeleroV1().PodVolumeBackups(volumeBackup.Namespace).Create(volumeBackup); err != nil { errs = append(errs, err) continue } + numVolumeSnapshots++ } ForEachVolume: