fix: resync of PITR slices
@@ -71,7 +71,7 @@ func (p *PBM) ResyncStorage(l *log.Event) error {
var pitr []interface{}
for _, f := range pitrf {
- _, err := stg.FileStat(f)
+ _, err := stg.FileStat(PITRfsPrefix + "/" + f)
if err != nil {
l.Warning("skip %s because of %v", f, err)
continue
@@ -82,6 +82,10 @@ func (p *PBM) ResyncStorage(l *log.Event) error {
}
}
+ if len(pitr) == 0 {
+ return nil
+ }
+
_, err = p.Conn.Database(DB).Collection(PITRChunksCollection).InsertMany(p.ctx, pitr)
if err != nil {
return errors.Wrap(err, "insert retrieved pitr meta")
