diff --git a/backrest.go b/backrest.go index 2bed367..bc2d465 100644 --- a/backrest.go +++ b/backrest.go @@ -76,7 +76,7 @@ func main() { defer oplog.Close() // Create rotating log storage - logStore := rotatinglog.NewRotatingLog(path.Join(config.DataDir(), "rotatinglogs"), 30) // 30 days of logs + logStore := rotatinglog.NewRotatingLog(path.Join(config.DataDir(), "rotatinglogs"), 14) // 14 days of logs if err != nil { zap.S().Fatalf("error creating rotating log storage: %v", err) } diff --git a/internal/oplog/oplog.go b/internal/oplog/oplog.go index f68ffa1..c224c15 100644 --- a/internal/oplog/oplog.go +++ b/internal/oplog/oplog.go @@ -95,7 +95,7 @@ func (o *OpLog) Scan(onIncomplete func(op *v1.Operation)) error { if lastValidated := sysBucket.Get([]byte("last_validated")); lastValidated != nil { c.Seek(lastValidated) } - for k, v := c.Next(); k != nil; k, v = c.Next() { + for k, v := c.Prev(); k != nil; k, v = c.Next() { op := &v1.Operation{} if err := proto.Unmarshal(v, op); err != nil { zap.L().Error("error unmarshalling operation, there may be corruption in the oplog", zap.Error(err)) diff --git a/internal/orchestrator/tasks/taskforget.go b/internal/orchestrator/tasks/taskforget.go index ba452da..20787fa 100644 --- a/internal/orchestrator/tasks/taskforget.go +++ b/internal/orchestrator/tasks/taskforget.go @@ -142,9 +142,9 @@ func useLegacyCompatMode(oplog *oplog.OpLog, planID string) (bool, error) { } delete(instanceIDs, "") if len(instanceIDs) > 1 { - zap.L().Warn("found mixed instance IDs in indexed snapshots, forcing forget to use new behavior (e.g. --tags including instance ID) despite the presence of legacy (e.g. untagged) snapshots.") + zap.L().Warn("found mixed instance IDs in indexed snapshots, overriding legacy forget behavior to include instance ID tags. This may result in unexpected behavior -- please inspect the tags on your snapshots.") return false, nil } - zap.L().Warn("found legacy snapshots without instance ID, forget will use legacy behavior e.g. --tags not including instance ID") + zap.L().Warn("found legacy snapshots without instance ID, recommending legacy forget behavior.") return true, nil } diff --git a/internal/protoutil/validation.go b/internal/protoutil/validation.go index bd31bf6..77ab4b3 100644 --- a/internal/protoutil/validation.go +++ b/internal/protoutil/validation.go @@ -24,7 +24,7 @@ func ValidateOperation(op *v1.Operation) error { return errors.New("operation.plan_id is required") } if op.InstanceId == "" { - zap.L().Warn("operation.instance_id should typically be set", zap.Any("operation", op)) + zap.L().Warn("operation.instance_id should typically be set") } if op.SnapshotId != "" { if err := restic.ValidateSnapshotId(op.SnapshotId); err != nil {