kopia/kopia · error
unable to get current maintenance parameters
Error message
unable to get current maintenance parameters
What it means
Wraps a failure of maintenance.GetParams(ctx, rep) while applying retention changes during `repository set-parameters`. When the new blobcfg enables retention, Kopia fetches current maintenance parameters to validate that retention can be extended safely; failure to read those parameters produces this error.
Solutions
- Run `kopia maintenance info` to confirm maintenance parameters exist and are readable, then retry set-parameters
- Initialize/repair maintenance config: kopia maintenance set --interval ... / run kopia maintenance run
- Fix storage connectivity or credential issues and retry
- Verify version compatibility between CLI and repository format
Example fix
// before
p, err := maintenance.GetParams(ctx, rep)
if err != nil { return errors.Wrap(err, "unable to get current maintenance parameters") }
// after
p, err := maintenance.GetParams(ctx, rep)
if err != nil {
log(ctx).Errorf("maintenance.GetParams: %v", err)
return errors.Wrap(err, "unable to get current maintenance parameters")
} Defensive patterns
Strategy: validation
Validate before calling
// ensure maintenance is configured before enabling retention
p, err := maintenance.GetParams(ctx, rep)
if err != nil {
return fmt.Errorf("maintenance must be configured before enabling retention: %w", err)
} Try / catch
p, err := maintenance.GetParams(ctx, rep)
if err != nil {
return errors.Wrap(err, "unable to get current maintenance parameters")
} Prevention
- Run `kopia maintenance info` first to confirm maintenance params exist
- Initialize maintenance settings on new repositories before enabling retention
- Check storage connectivity before retention changes
When it happens
Trigger: `kopia repository set-parameters --retention-*` (or any change enabling retention) where maintenance.GetParams cannot read the maintenance schedule/parameters from the repository — storage failure, missing maintenance config blob, or unparseable parameters.
Common situations: Retention being enabled on a repository that never had maintenance configured/quick-maintenance run; object storage temporarily unavailable; maintenance config written by an incompatible Kopia version.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- unable to apply maintenance changes
- unable to apply maintenance changes
- unable to get current parameters
- blob configuration
- blob configuration
AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07).
Data as JSON: /api/errors/f17aa001e30a3490.
Report an issue: GitHub.
Appendix: source
Thrown at cli/command_repository_set_parameters.go:227
setDurationParameter(ctx, c.epochMinDuration, "minimum epoch duration", &mp.EpochParameters.MinEpochDuration, &anyChange)
setDurationParameter(ctx, c.epochRefreshFrequency, "epoch refresh frequency", &mp.EpochParameters.EpochRefreshFrequency, &anyChange)
setDurationParameter(ctx, c.epochCleanupSafetyMargin, "epoch cleanup safety margin", &mp.EpochParameters.CleanupSafetyMargin, &anyChange)
setIntParameter(ctx, c.epochAdvanceOnCount, "epoch advance on count", &mp.EpochParameters.EpochAdvanceOnCountThreshold, &anyChange)
setSizeMBParameter(ctx, c.epochAdvanceOnSizeMB, "epoch advance on total size", &mp.EpochParameters.EpochAdvanceOnTotalSizeBytesThreshold, &anyChange)
setIntParameter(ctx, c.epochDeleteParallelism, "epoch delete parallelism", &mp.EpochParameters.DeleteParallelism, &anyChange)
setIntParameter(ctx, c.epochCheckpointFrequency, "epoch range-compaction period", &mp.EpochParameters.FullCheckpointFrequency, &anyChange)
requiredFeatures = c.addRemoveUpdateRequiredFeatures(requiredFeatures, &anyChange)
if !anyChange {
log(ctx).Info("no changes")
return nil
}
if blobcfg.IsRetentionEnabled() {
p, err := maintenance.GetParams(ctx, rep)
if err != nil {
return errors.Wrap(err, "unable to get current maintenance parameters")
}
if err := maintenance.CheckExtendRetention(ctx, blobcfg, p); err != nil {
return errors.Wrap(err, "unable to apply maintenance changes")
}
}
if err := updateRepositoryParameters(ctx, upgradeToEpochManager, mp, rep, blobcfg, requiredFeatures); err != nil {
return errors.Wrap(err, "error updating repository parameters")
}
log(ctx).Info("NOTE: Repository parameters updated, you must disconnect and re-connect all other Kopia clients.")
return nil
}
func (c *commandRepositorySetParameters) addRemoveUpdateRequiredFeatures(orig []feature.Required, anyChange *bool) []feature.Required {
var result []feature.RequiredView on GitHub (pinned to 82495e54b5)